GUIDE TO SEASONAL
ADJUSTMENT
WITH X-1 3 ARIMA-SEATS©
TIME SERIES ANALYSIS BRANCH
METHODOLOGY AND QUALITY
ONS: Guide to Seasonal Adjustment
with X-13ARIMA-SEATS©
location:
Office for National Statistics,
Time Series Analysis Branch,
Cardiff Road,
Newport, NP10 8X
United Kingdom
contact:
Time Series Analysis Branch
last update:
April 2024
PURPOSE OF THIS GUIDE
Seasonal adjustment is widely used in official statistics as a technique to X-13Arima
-Seats
allow the timely interpretation of time series data. X-13ARIMA-SEATS
has been chosen from the many available seasonal adjustment software
packages as the standard package for use in official statistics in the United
Kingdom (UK). This was agreed by the Statistical Policy and Standards
Committee in 2012.
X-13ARIMA-SEATS incorporates the X-11 and SEATS methods of sea-
sonal adjustment, two alternative methods that are widely used by many
of the leading national statistical institutes National Statistics Institute (NSI)
across the world.
X-13ARIMA-SEATS was developed by the United States Census Bureau
(USCB) and replaces X-12-ARIMA, the previously recommended software
for seasonal adjustment of official statistics in the UK. The software is
comprehensive, with many options to tailor seasonal adjustment to each
individual series. It therefore requires many choices to be made by its
users.
The main purpose of this guide is to provide practical guidance on sea-
sonal adjustment using X-13ARIMA-SEATS. The guide explains what sea-
sonal adjustment is and addresses many of the issues and problems asso-
ciated with seasonal adjustment.
A detailed explanation of the X-11 method can be found in Ladiray
and Quenneville (2001) while an explanation of the SEATS method can be
found in Gómez and Maravall (2001).
This guide starts with a brief introduction to seasonal adjustment and What is in
this guide
to some of the main associated issues (Chapter 1). It then provides an
overview of the X-11 and SEATS methods (Chapter 2), and a description
of how to run the programme (Chapter 3).
Chapter 25 discusses how to download, install, and use the software.
Chapter 26 provides a useful quick guide to seasonal adjustment that gives
a list of solutions to common seasonal adjustment problems.
Chapter 4to Chapter 24 address issues to consider when performing
seasonal adjustment.
For making simple updates on existing spec files due to new data,
see Chapter 11
For an explanation of the regARIMA model, see Chapter 8
iii
For understanding and implementing regressors, see Chapter 9,Chap-
ter 10, and Chapter 11
For writing a new spec file, see Chapter 3,Chapter 12,Chapter 13,
and Chapter 15
For understanding output from X13ARIMA-SEATS, see Chapter 16,
and Chapter 18
For analysing revisions patterns, see Chapter 7, and Chapter 19
For information about software X-13ARIMA-SEATS can be used with,
see Chapter 3,Chapter 16, and Chapter 25
For measures of uncertainty, see Chapter 24
This guide is intended to be used as a reference guide. Users are advisedHow to use
this guide to read chapters 1-3before attempting any seasonal adjustment, and to
refer to other parts of the guide as appropriate. Seasonal adjustment prac-
titioners should attend a training course. This guide complements, but is
not a substitute for such a training course. ONS provides a short training
course for users of seasonal adjustment. The University of Southampton
provides an advanced module in time series analysis and seasonal adjust-
ment. More information on training courses can be obtained from Time
Series Analysis Branch (TSAB).
This guide does not describe the detailed workings of X-13ARIMA-What this
guide is not SEATS, nor the underlying mathematics. The interested reader is referred
to the X-13ARIMA-SEATS user manual (USCB 2017)as a good starting
point. Additional technical references and papers are listed in the refer-
ences in the bibliography.
The ONS Time Series Analysis Branch (TSAB) provides expertise in timeWhat does
TSAB do? series analysis and in particular seasonal adjustment. TSAB has produced
this guide, and provides courses in seasonal adjustment. TSAB is respon-
sible for the quality of all ONS seasonal adjustment and manages a rolling
programme of annual seasonal adjustment reviews of statistical outputs
across ONS. TSAB also provides support for practitioners and users of
seasonal adjustment across the Government Statistical Service and is the
main point of contact for any questions or queries regarding seasonal ad-
justment and time series analysis in official statistics.
The Office for National Statistics has a programme of training coursesTraining Courses
including seasonal adjustment. Further information can be found from
Government Analysis Function website. A good suggestion for beginners
could be the Awareness in Seasonal Adjustment course. Contact TSAB for
iv
more information on training.
Australian Bureau of Statistics (ABS), ABS website, methods; classifi- Useful websites
cations; concepts & standards, Time Series Analysis: The Basics.
European Union, Eurostat website, methodology, Seasonal Adjust-
ment
Government Analysis Function, Government Analysis Function web-
site, GSS methodology support, Information on Specific Statistical
Methods
Office for National Statistics (ONS), ONS website, methodology top-
ics and statistical concepts, Seasonal Adjustment
United States Census Bureau (USCB), released 11 July 2022, USCB
website, software, X-13ARIMA-SEATS Seasonal Adjustment Program
If you have a query related to time series analysis, seasonal adjustment Contact details
or if you have any comments on this guide we can be contacted at: Time
Series Analysis Branch, Office for National Statistics, Cardiff Road, New-
port, NP10 8XG or by email.
v
ACKNOWLEDGEMENTS
This guide has been developed with the input and assistance of the follow-
ing people: Claudia Annoni, Folasade Ariyibi, Simon Compton, Jennifer
Davies, Francis Dunnett, Duncan Elliott, Giorgia Galeazzi, Mark Hogan,
Juliane Haarmann, Lee Howells, Fida Hussain, Cathy Jones, Peter Kenny,
Jim Macey, Craig McLaren, Ross Meader, Dimitrios Nikolakis, Neil Parkin,
Chris Payne, Nigel Stuttard, Anthony Szary, Anita Visavadia, Matt Whip-
ple and Ping Zong.
Please bring any errors or omissions to our attention using the contact
details above.
vii
CONTENTS
1 introduction to seasonal adjustment 1
1.1What is seasonal adjustment? . . . . . . . . . . . . . . . . . . 1
1.2Components of a time series . . . . . . . . . . . . . . . . . . . 2
1.3The seasonal adjustment process . . . . . . . . . . . . . . . . 3
1.4Other issues that affect seasonal adjustment . . . . . . . . . . 4
1.5Interpreting time series outputs . . . . . . . . . . . . . . . . . 4
1.6X-13ARIMA-SEATS........................ 5
1.7Knowyourseries ......................... 6
2 overview of x-13arima-seats 7
2.1Introduction ............................ 7
2.1.1Brief review of X-13ARIMA-SEATS software devel-
opment........................... 7
2.1.2New features of X-13ARIMA-SEATS . . . . . . . . . . 8
2.2Methods in X-13ARIMA-SEATS................. 8
2.2.1regARIMA models prior adjustment . . . . . . . . . 8
2.2.2Seasonal adjustment the X-11 Method . . . . . . . . 10
2.2.3Seasonal adjustment - the SEATS method . . . . . . . 15
2.3Differences between X-12-ARIMA and X-13ARIMA-SEATS . 16
2.4Example: decomposing the original time series . . . . . . . . 17
2.5Diagnosticchecking........................ 17
3 how to use x-13arima-seats with win x-13 19
3.1Downloading and installing X-13ARIMA-SEATS and WIN
X-13 ................................. 19
3.2Using X-13ARIMA-SEATS with WIN X-13 .......... 19
3.2.1Thedatale........................ 20
3.2.2The specification file . . . . . . . . . . . . . . . . . . . 21
3.3Example of use of X-13ARIMA-SEATS with WIN X-13 ... 23
3.4Summary.............................. 28
4 length of the series 29
4.1Introduction ............................ 29
4.2How long a time series does X-13ARIMA-SEATS need? . . . 29
4.3Seasonally adjusting short series . . . . . . . . . . . . . . . . 30
4.3.1Methods available to seasonally adjust short series . 30
4.4What is the recommended length of a time series for sea-
sonaladjustment?......................... 32
5 consistency across time 33
5.1Introduction ............................ 33
5.2Annualconstraining ....................... 34
5.2.1What is annual constraining? . . . . . . . . . . . . . . 34
ix
xcontents
5.2.2When should annual constraining be applied? . . . . 34
5.2.3Annual constraining and revisions . . . . . . . . . . . 35
5.2.4Annual constraining in X-13ARIMA-SEATS . . . . . 35
5.2.5Financial year constraining . . . . . . . . . . . . . . . 37
5.3Statistics .............................. 37
5.4Consistency ............................ 38
6 aggregate series 41
6.1Introduction ............................ 41
6.2Additivity of components and seasonal adjustment . . . . . 42
6.3What type of adjustment should be used . . . . . . . . . . . 43
6.3.1Factors favouring indirect seasonal adjustment . . . . 44
6.3.2Factors favouring direct seasonal adjustment . . . . . 44
6.3.3Direct vs indirect methods . . . . . . . . . . . . . . . . 45
6.4Otherrelatedtopics........................ 46
6.4.1Constraining to preserve additivity . . . . . . . . . . 46
6.4.2Other considerations . . . . . . . . . . . . . . . . . . . 46
6.4.3Using X-13ARIMA-SEATS to choose the seasonal ad-
justment .......................... 47
7 revisions and updates 49
7.1Introduction ............................ 49
7.2Typesofupdating......................... 49
7.3Which seasonal adjustment parameters
should be fixed or re-estimated . . . . . . . . . . . . . . . . . 50
7.4Revisions.............................. 51
8 the reg-arima model 55
8.1Introduction ............................ 55
8.2OverviewofregARIMA ..................... 55
8.3Transformation of the series . . . . . . . . . . . . . . . . . . . 56
8.4Specification of the ARIMA part of the model . . . . . . . . 57
8.4.1Automatic model selection with the automdl spec . . 59
8.4.2Automatic model selection with the pickmdl spec . . 60
8.4.3Fixing the ARIMA model . . . . . . . . . . . . . . . . 61
8.4.4Identifying a model manually . . . . . . . . . . . . . . 62
8.5Specify the regression part . . . . . . . . . . . . . . . . . . . . 62
8.5.1Types of regression variables . . . . . . . . . . . . . . 63
8.5.2Program-specified regression variables . . . . . . . . 64
8.5.3User-specified variables . . . . . . . . . . . . . . . . . 66
8.5.4Optional variables and statistical tests . . . . . . . . . 67
8.6Estimation and inference with regARIMA . . . . . . . . . . . 67
8.6.1Automatically run tests . . . . . . . . . . . . . . . . . 68
8.6.2Non-automatic tests . . . . . . . . . . . . . . . . . . . 68
8.7Summary of implementation instructions . . . . . . . . . . . 70
8.7.1Time series analysed for the first time . . . . . . . . . 70
x
contents xi
8.7.2Model set up for regular seasonal adjustment review 71
8.7.3Model set up for production running . . . . . . . . . 71
9 trading day 73
9.1Introduction ............................ 73
9.2The arrangement of the calendar . . . . . . . . . . . . . . . . 73
9.3When to adjust for trading day . . . . . . . . . . . . . . . . . 75
9.4Options available to adjust for trading day effects . . . . . . 76
9.5How to adjust for trading day effect . . . . . . . . . . . . . . 78
9.5.1Testing for trading day effects with X-13ARIMA-SEATS 79
9.5.2Adjust for trading day effects . . . . . . . . . . . . . . 83
9.6Relatedtopics ........................... 87
9.7Non-calendardata ........................ 87
10 easter and other moving holidays 89
10.1Introduction ............................ 89
10.2TheEastereffects ......................... 89
10.3When to adjust for Easter effect . . . . . . . . . . . . . . . . . 90
10.4Options available to adjust for Easter effects . . . . . . . . . 91
10.5How to adjust for Easter effect . . . . . . . . . . . . . . . . . 93
10.5.1Testing for Easter effects with X-13ARIMA-SEATS . . 93
10.5.2Adjust for Easter effects . . . . . . . . . . . . . . . . . 100
10.5.3TheUS/UKproblem................... 103
10.6Ramadan effect and other moving holidays . . . . . . . . . . 104
10.6.1How to estimate and adjust for Ramadan effects . . . 104
11 level shifts and additive outliers 107
11.1Introduction ............................ 107
11.2Levelshifts............................. 107
11.2.1What is a level shift? . . . . . . . . . . . . . . . . . . . 107
11.2.2Why adjust for a level shift? . . . . . . . . . . . . . . . 107
11.3Additiveoutliers ......................... 109
11.3.1What is an additive outlier? . . . . . . . . . . . . . . . 109
11.3.2Why adjust for an additive outlier . . . . . . . . . . . 109
11.4How identify and adjust for level shifts and additive outliers 111
11.4.1Run the series in X-13ARIMA-SEATS and look at the
outputdiagnostics .................... 111
11.4.2Length of the series before and after the level shift or
outlier ........................... 111
11.4.3Testing for level shifts and additive outliers in X13-
ARIMA-SEATS ...................... 112
11.4.4Confirming the reason for the level shifts or additive
outliers........................... 113
11.5Denition.............................. 113
11.5.1Adjust for the level shifts or the additive outliers . . 114
11.6Otheroutliertypes ........................ 119
xi
xii contents
11.6.1Ramps(RP) ........................ 119
11.6.2Temporary changes (TC) . . . . . . . . . . . . . . . . . 119
12 decomposition models 121
12.1Theoptions ............................ 121
12.2How to decide which seasonal decomposition to use . . . . 122
12.2.1Graphical inspection . . . . . . . . . . . . . . . . . . . 122
12.2.2Analytical approach . . . . . . . . . . . . . . . . . . . 124
12.3Updating.............................. 125
13 moving averages 127
13.1Introduction ............................ 127
13.2What are moving averages? . . . . . . . . . . . . . . . . . . . 127
13.3Trendmovingaverages...................... 131
13.3.1Options for trend moving averages . . . . . . . . . . . 131
13.3.2Trend moving average selection by X-13ARIMA-SEATS132
13.3.3When to change the trend moving average . . . . . . 132
13.4Seasonal moving averages . . . . . . . . . . . . . . . . . . . . 132
13.4.1Options for seasonal moving averages . . . . . . . . . 133
13.4.2Manual selection of seasonal moving averages . . . . 135
13.4.3When to change the seasonal moving average . . . . 136
13.5Updating.............................. 137
13.6Summary.............................. 138
14 seasonal breaks 139
14.1What is a seasonal break? . . . . . . . . . . . . . . . . . . . . 139
14.2Why adjust for a seasonal break? . . . . . . . . . . . . . . . . 140
14.3A useful test for seasonality . . . . . . . . . . . . . . . . . . . 142
14.4How to identify and adjust for a seasonal break . . . . . . . 143
14.4.1Run the Series in X-13ARIMA-SEATS and look at the
outputdiagnostics .................... 143
14.4.2Testing for seasonal break using X-13ARIMA-SEATS 145
14.4.3Confirming a reason for a seasonal break with the
hostbranch ........................ 146
14.4.4Length of the series before and after the seasonal break146
14.4.5Adjust for the seasonal break . . . . . . . . . . . . . . 147
14.5Quick implementation for seasonal breaks in a spec file . . . 153
14.5.1Seasonal seasonal & non-seasonal seasonal breaks153
14.5.2Seasonal non-seasonal (or any combination end-
ing with non-seasonal) breaks . . . . . . . . . . . . . . 154
15 the existence of seasonality 157
15.1Introduction ............................ 157
15.2Contradictory statistics . . . . . . . . . . . . . . . . . . . . . . 157
15.3Weakseasonality ......................... 158
15.4Compositetimeseries ...................... 159
15.5Testing a composite dataset for seasonality . . . . . . . . . . 160
xii
contents xiii
16 x-13arima-seats standard output 163
16.1Introduction ............................ 163
16.2Outputdiagnostics ........................ 164
16.2.1Diagnostics of the prior adjustments . . . . . . . . . . 165
16.2.2Diagnostics of the seasonal adjustment . . . . . . . . 168
16.2.3Otherdiagnostics..................... 169
16.3The results of the seasonal adjustment . . . . . . . . . . . . . 171
16.3.1Most important seasonal adjustment tables . . . . . . 171
16.3.2Less important seasonal adjustment tables . . . . . . 172
16.3.3Tables not printed by default . . . . . . . . . . . . . . 173
16.4Diagnostics of X-13ARIMA-SEATS inherited from X-12ARIMA174
16.5New or improved diagnostics of X-13ARIMA-SEATS for SEATS
estimate............................... 175
16.6ErrorandLogFiles ........................ 176
16.7Win X-13 diagnosticstable.................... 178
17 graphs and java graphs 181
17.1Introduction ............................ 181
17.2Therawdata............................ 182
17.3The seasonally adjusted estimates . . . . . . . . . . . . . . . 182
17.4The seasonal irregular ratios vs the seasonal factors . . . . . 182
17.5Thespectrum ........................... 185
17.6Otherusefulgraphs........................ 185
17.6.1Componentgraphs.................... 185
17.6.2Comparisongraphs.................... 187
17.6.3Forecastgraph....................... 187
17.6.4ACFandPACF ...................... 187
18 sliding spans 189
18.1Introduction ............................ 189
18.2When to use sliding spans . . . . . . . . . . . . . . . . . . . . 189
18.3How sliding spans works . . . . . . . . . . . . . . . . . . . . 190
18.4How to use sliding spans . . . . . . . . . . . . . . . . . . . . 193
18.4.1Theoutput......................... 193
18.4.2Sliding spans options . . . . . . . . . . . . . . . . . . . 194
18.4.3When sliding spans will not work . . . . . . . . . . . 196
18.5Summary.............................. 197
19 history diagnostics 199
19.1Introduction ............................ 199
19.2When to use revisions history . . . . . . . . . . . . . . . . . . 199
19.3How the revisions history diagnostic works . . . . . . . . . . 200
19.4How to use revisions history? . . . . . . . . . . . . . . . . . 201
19.4.1Comparing two competing adjustments . . . . . . . . 201
19.4.2Comparing direct and indirect seasonal adjustment . 206
19.4.3Using AICC history to choose between two adjustments207
xiii
xiv contents
19.5When revisions history will not work . . . . . . . . . . . . . 208
19.6Summary.............................. 209
20 composite spec 211
20.1Introduction ............................ 211
20.2Thespecles............................ 211
20.2.1Example .......................... 212
20.3Comparing adjustment using X-13ARIMA-SEATS diagnostics 213
20.3.1Residual seasonality in the seasonally adjusted series 213
20.3.2Revisionerrors ...................... 214
20.3.3Stability .......................... 214
20.3.4Interpretability of seasonally adjusted series . . . . . 214
20.3.5Smoothess of seasonally adjusted series . . . . . . . . 214
21 forecasting 217
21.1Introduction ............................ 217
21.2Forecasting in seasonal adjustment . . . . . . . . . . . . . . . 217
21.3Forecasting for a purpose different from seasonal adjustment 219
21.3.1Model selection to generate forecasts . . . . . . . . . 219
21.3.2Modelvalidation ..................... 223
21.3.3Considerations ...................... 223
22 trend estimation 227
22.1Introduction ............................ 227
22.2The I/C ratio and the MCD . . . . . . . . . . . . . . . . . . . 227
22.3The standard trend estimation method . . . . . . . . . . . . . 229
22.4Presentation of trends . . . . . . . . . . . . . . . . . . . . . . 229
22.5Considerations........................... 230
23 quality measures 233
23.1Introduction ............................ 233
23.2Whatisquality .......................... 233
23.3Time series quality measures . . . . . . . . . . . . . . . . . . 235
23.4How to interpret time series quality measures . . . . . . . . 244
23.4.1Quality measures for seasonal adjustment . . . . . . 244
23.4.2Quality measures for forecasting . . . . . . . . . . . . 244
23.4.3Quality measures for trend estimates . . . . . . . . . 246
24 variance estimation 249
24.1Introduction ............................ 249
24.2Why the NSA standard errors cannot be applied to the SA
series ................................ 249
24.3Approximatemethods ...................... 249
24.3.1WolterandMonsour ................... 250
24.3.2Pfeffermann ........................ 250
24.3.3Replication......................... 250
25 software 251
25.1Downloading and installation instruction . . . . . . . . . . . 251
xiv
contents xv
25.2Alternative seasonal adjustment methods . . . . . . . . . . . 251
25.3Graphical user interfaces for X-13ARIMA-SEATS . . . . . . . 251
25.3.1Jdemetra+ ......................... 251
25.3.2WinX13 ........................... 254
25.3.3X13GraphJava....................... 254
25.4Rseasonpackage ......................... 254
25.4.1Plotting outputs in R . . . . . . . . . . . . . . . . . . . 257
26 quick guide to solving seasonal adjustment problems259
bibliography 267
xv
LIST OF FIGURES
Figure 1.1Non seasonally adjusted series (Non Seasonally Ad-
justed Series (NSA)) and seasonally adjusted (Seasonally
Adjusted Series (SA)) data for United Kingdom vis-
itsabroad......................... 1
Figure 1.2Components of a time series, with multiplicative de-
composition ....................... 3
Figure 2.1Seasonal adjustment in X-13ARIMA-SEATS . . . . . 9
Figure 2.2January SI ratios for retail sales in non-specialised
stores (predominantly food) . . . . . . . . . . . . . . 12
Figure 2.3January SI ratios with replacement values . . . . . . 13
Figure 2.4Outlier identification and weighting . . . . . . . . . 14
Figure 2.5January SI ratios with moving average values . . . . 15
Figure 2.6Graphical representation of time series components 17
Figure 3.1Saving the “.dat.” file . . . . . . . . . . . . . . . . . . 24
Figure 3.2Automatic spec file . . . . . . . . . . . . . . . . . . . 24
Figure 3.3Running the automatic spec file . . . . . . . . . . . . 25
Figure 3.4Outputle ........................ 25
Figure 3.5Charts for automatic spec file . . . . . . . . . . . . . 26
Figure 3.6Diagnostics for automatic spec file . . . . . . . . . . 26
Figure 3.7Finalspecle....................... 27
Figure 7.1Revisions of seasonally adjusted estimates over time 51
Figure 10.1Seasonally adjusting with and without an Easter effect 97
Figure 10.2SI ratios for March and April for the series showing
Eastereffects....................... 97
Figure 10.3Example of E5table................... 99
Figure 11.1Example of a level shift . . . . . . . . . . . . . . . . . 108
Figure 11.2No prior adjustment for level shift regressor . . . . 108
Figure 11.3Comparing SA values with and without a level shift
regressor ......................... 109
Figure 11.4Example of series requiring an additive outlier re-
gressor when seasonally adjusting . . . . . . . . . . 110
Figure 11.5Seasonal adjustment with no prior adjustment for
outlier........................... 110
Figure 11.6Difference between seasonally adjusted series when
prior adjusting for level shift (SA_TP) and no prior
adjustment (SA) ..................... 115
xvi
List of Figures xvii
Figure 11.7Difference between seasonally adjusted series when
prior adjusting for additive outlier in 2002 quarter 1
(SA_TP) and no prior adjustment (SA)........ 115
Figure 12.1Example of a multiplicative decomposition . . . . . 122
Figure 12.2Example of an additive decomposition . . . . . . . . 123
Figure 13.1 3x5seasonal moving average . . . . . . . . . . . . . 137
Figure 13.2E3x9seasonal moving average . . . . . . . . . . . . . 137
Figure 14.1Example of a seasonal break: car registrations . . . . 139
Figure 14.2SIratios.......................... 141
Figure 14.3No prior adjustment for seasonal break . . . . . . . 142
Figure 14.4Seasonally adjusted car registrations prior adjusted
for seasonal break . . . . . . . . . . . . . . . . . . . . 149
Figure 14.5SI ratios with prior adjusted for a seasonal break . . 150
Figure 16.1Generaltab........................ 178
Figure 16.2Modelinfotab...................... 179
Figure 16.3Model diagnostics tab . . . . . . . . . . . . . . . . . . 179
Figure 16.4X11 tab .......................... 180
Figure 17.1Graph of the original series . . . . . . . . . . . . . . 182
Figure 17.2Graph of the seasonally adjusted series . . . . . . . 183
Figure 17.3Graph of the replaced SI ratios . . . . . . . . . . . . 184
Figure 17.4Graph of the seasonal factors . . . . . . . . . . . . . 184
Figure 17.5Graphs of the spectra of prior adjusted series from
Win X-13 and X-13 graph Java . . . . . . . . . . . . . 186
Figure 17.6Graphs of the seasonal factors and irregular compo-
nents............................ 186
Figure 17.7Graph of the original and comparison of seasonally
adjustedseries...................... 187
Figure 17.8Graph of the forecast series and confidence intervals 188
Figure 17.9Graph of the ACF and PACF of residual component 188
Figure 18.1Illustration of 4sliding spans, length 7years . . . . 191
Figure 22.1Front page, first release . . . . . . . . . . . . . . . . . 231
Figure 22.2“What-If graph, background notes . . . . . . . . . 231
Figure 23.1Airline passengers . . . . . . . . . . . . . . . . . . . . 236
Figure 23.2Comparison of seasonally adjusted and original series237
Figure 23.3SI ratios for August . . . . . . . . . . . . . . . . . . . 238
Figure 23.4Graph of forecast estimates and their confidence in-
tervals........................... 243
Figure 23.5Quality measure for seasonal adjustment . . . . . . 245
Figure 23.6Confidence intervals with forecasts . . . . . . . . . . 246
Figure 23.7Quality measures for trend estimates, UK visits abroad247
Figure 25.1Loading data in JDemetra+ . . . . . . . . . . . . . . . 252
Figure 25.2Performing seasonal adjustment using a single anal-
ysisinJDemetra+ .................... 253
xvii
Figure 25.3Changing ARIMA model under a single analysis in
JDemetra+ ........................ 253
Figure 25.4Adding AO and LS regressors under a single anal-
ysisinJDemetra+ .................... 254
Figure 25.5Graph of data produced using ts.plot . . . . . . . . . 258
Figure 25.6Graph of data produced using dygraphs . . . . . . . 258
LIST OF TABLES
Table 5.1A1time series data (for the span analysed) . . . . . 38
Table 5.2D11.A final seasonally adjusted series with forced
yearly totals denton method used. . . . . . . . . . . 38
Table 7.1Published time series at different publication dates . 52
Table 7.2Quarter-on-Quarter (QQ) revision to published time
series ........................... 52
Table 8.1Alternative values for the maxorder argument . . . 60
Table 9.1Day of week composition for June 2019,2020 and 2021 74
Table 9.2Trading day regressor options . . . . . . . . . . . . . 78
Table 9.3Length of time regressors used in flow series . . . . 87
Table 10.1Predefined Easter regressor options . . . . . . . . . . 92
Table 16.1Frequently used D-tables . . . . . . . . . . . . . . . . 164
Table 16.2D8Final unmodified SI ratios from 1991.1to 2002.4
with 48 observations .................. 166
Table 16.3E5quarter-to-quarter percent change in the original
series from 1991.2to 2002.4with 47 observations . . 167
Table 16.4F4: multiplicative trading day component factors:
day of week and leap year factors . . . . . . . . . . . 174
Table 18.1The sliding spans output table . . . . . . . . . . . . . 193
Table 19.1Revisions history . . . . . . . . . . . . . . . . . . . . 205
Table 19.2Otheroptions ...................... 205
Table 19.3Selected values from table R7............. 208
Table 21.1Appropriate modelling method for forecasting . . . 218
Table 21.2Appropriate modelling method and forecast horizon 221
Table 23.1ONS data quality attributes . . . . . . . . . . . . . . 234
Table 23.2Quality measures used in seasonal adjustment . . . 235
Table 25.1List of specification arguments in X-13ARIMA-SEATS
and R seasonal function equivalents . . . . . . . . . 257
Table 26.1M-statistic meanings and suggestions . . . . . . . . 261
xviii
Table 26.2Examples of temporary and permanent prior ad-
justments ......................... 262
ACRONYMS
ACF Autocorrelation Function
AIC Akaike Information Criterion
AICC Akaike Information Criterion Corrected
ANOVA Analysis of Variance
AR Autoregressive
ARIMA Autoregressive Integrated Moving Average
ARMA Autoregressive Moving Average
BIC Bayesian Information Criterion
CAT Comparison of Annual Totals
CPI Consumer Price Index
CTQ Contingency Table Q
ESS European Statistical System
GDP Gross Domestic Product
GSS Government Statistical Service
IDS IDentifiable Seasonality Test Result
MA Moving Average
MCD Months for Cyclical Dominance
MM Month-on-Month
NSA Non Seasonally Adjusted Series
NSI National Statistics Institute
ONS Office for National Statistics
xix
xx acronyms
PACF Partial Autocorrelation Function
QQ Quarter-on-Quarter
regARIMA regression+ARIMA
SA Seasonally Adjusted Series
SEATS Signal Extraction in ARIMA Time Series
SI Irregular to Seasonal Ration (also I/S)
STAR Stability of Trend and Adjusted Series Rating
SPSC UK Statistical Policy and Standards Committee
TC Temporary Change
TRAMO Time Series Regression with ARIMA Noise, Missing
Observations and Outliers
TSAB Time Series Analysis Branch
USCB United States Census Bureau
YY Year-on-Year
PEEIs Principal European Economic indicators
xx
1
INTRODUCTION TO SEASONAL ADJUSTMENT
1.1 what is seasonal adjustment?
A time series is defined as ...a collection of observations made sequentially
in time1”. Many of the most well known statistics published by the Office
for National Statistics (ONS) are regular time series including: the claimant
count; the Consumer Price Index (CPI); Balance of Payments and Gross
Domestic Product (GDP). Users of these time series typically seek to un-
derstand the general pattern of the data, for example the long term move-
ments, and whether any unusual occurrences have had major effects on
the series. This type of analysis is complicated because there will normally
be regular effects associated with the time of the year and the arrangement
of the calendar that obscure movements. For example, retail sales rise each
December because ofChristmas and this may obscure underlying move-
ments in the retail sales trend. The purpose of seasonal adjustment is to
remove variation associated with the time of the year and the arrange-
ment of the calendar. This helps users to interpret movement in the series
between consecutive time periods. Figure 1.1below is a good example of
a series with large seasonal peaks and troughs and also the seasonally
adjusted series with these peaks and troughs removed.
Figure 1.1: Non seasonally adjusted series (NSA) and seasonally adjusted (SA)
data for United Kingdom visits abroad
1Chatfield (2016)
1
2 introduction to seasonal adjustment
1.2 components of a time series
Time series can be thought of as combinations of three distinctly differ-
ent types of behaviour, each representing the impact of certain types of
real world events on the data. These three components are: seasonal and
calendar-related effects, irregular fluctuations, and trend behaviour. Sea-
sonal and calendar effects are usually grouped into the same component,
but sometimes are reported separately.
Seasonal effects are patterns that repeat approximately a whole num-
ber of times per year; they may evolve or change suddenly. The seasonal
effects could be caused by various factors, such as weather patterns2, ad-
ministrative measures3, and social, cultural and religious events4.
Effects caused by the arrangement of the calendar include:
variation in the length of months and quarters caused by due to the
nature of the calendar
trading day effects, which are caused by months having different
numbers of each day of the week from year to year. For example,
spending in hardware stores is likely to be higher in the same month
when it has five weekends rather than four
moving holidays, which may fall in different months from year to
year: for example Easter, which can occur in either March or April.
Irregular fluctuations may occur because of due to a combination of unpre-
dictable or unexpected factors, such as unseasonable or extreme weather,
natural disasters or strikes. The contribution of the irregular fluctuations
will generally change in magnitude and/or direction from period to pe-
riod.
The trend represents the underlying behaviour and direction of the
series. It captures the long-term behaviour of the series as well as the
medium-term business cycle for socio-economic time series. The long-term
and medium-term behaviour can be separated into separate trend and cy-
cle components. In practice these are usually combined into a trend-cycle
component. This guide will refer to a single trend-cycle component.
2e.g. the increase in energy consumption with the onset of winter
3e.g. the start and end dates of the school year
4e.g. retail sales increasing in the run up to Christmas
2
1.3 the seasonal adjustment process 3
Figure 1.2: Components of a time series, with multiplicative decomposition
1.3 the seasonal adjustment process
Although there are many ways in which these components could fit to-
gether in a time series, in practice we use one of two models:
1. Additive model: Yt=Ct+St+It
2. Multiplicative model: Yt=Ct×St×It
where Ytis the observed original time series at time point t, Ctis the
trend-cycle, Itis the irregular component, and Stis the seasonal component
and the calendar effects. There are occasions when calendar effects might
need to be removed separately; in those cases the notation can be extended
in a natural way, with a redefinition of Stto be just the seasonal component.
The seasonally adjusted series is formed by estimating and removing the
seasonal and calendar effects. The seasonally adjusted series are
1. Additive model: YtSt=Ct+It
2. Multiplicative model: Yt
St=Ct×It
3
4 introduction to seasonal adjustment
In a multiplicative decomposition, the seasonal effects change propor-
tionately with the trend. If the trend rises, the seasonal effects increase in
magnitude, while if the trend moves downward the seasonal effects di-
minish. In an additive decomposition the seasonal effects remain broadly
constant regardless of which direction the trend is moving in. In practice
most economic time series exhibit a multiplicative relationship and hence
the multiplicative decomposition often provides the best fit. A multiplica-
tive decomposition cannot be used in its most basic form if any zero or
negative values appear in the time series, however it could be used with
the temporary addition of a constant value to the time series.
1.4 other issues that affect seasonal adjustment
There are a variety of issues that can impact on the quality of the seasonal
adjustment. These include:
Extreme values (usually modelled as additive outliers). These usu-
ally have identifiable causes, such as strikes, war, or extreme weather
conditions. They are normally considered to be part of the irregular
component
Trend breaks (usually modelled as level shifts) where the trend com-
ponent suddenly increases or decreases sharply. Possible causes in-
clude changes in definitions relating to the series that is being mea-
sured for example, to take account of a reclassification of products
or a change in the rate of taxation
Seasonal breaks are sudden and sustained changes in the seasonal
pattern. An example would be the change in the seasonal pattern of
car sales when the registration numbers moved from an annual to
six-month cycle
These issues need to be addressed as part of the seasonal adjustment pro-
cess in order to obtain the most reliable estimate of the seasonal compo-
nent.
1.5 interpreting time series outputs
Current practice at ONS is to publish the original non-seasonally adjusted
and seasonally adjusted estimates. In ONS publications the focus is usu-
ally on the level of the SA series and the period-to-period change or rate
of change in the level of the SA series. A comparison with the same pe-
riod in the previous year is also often published, but this gives a historical
picture of the growth rate and can result in a delay in the identification
4
1.6 x-13arima-seats 5
of turning points in the series. A very crude form of seasonal adjustment
is to consider the growth rate from the same period in the previous year
for the non-seasonally adjusted series, and sometimes it is assumed that
this growth rate would be the same for the seasonally adjusted and the
original unadjusted series. However, this will only be the case if the sea-
sonal component is stable and there are no other calendar related effects.
In practice seasonality often evolves over time, and the seasonal factors
should reflect this. Currently the measure of Year-on-Year (YY) change rec-
ommended by ONS is the YY change in the seasonally adjusted series, as
this takes into account the impact of a change in seasonal patterns over
time and calendar effects.
In general, annual totals of seasonally adjusted estimates will not sum to
the annual totals of the non-seasonally adjusted estimates. This is caused
by a various factors, including moving seasonality, incomplete cycles, cal-
endar effects and outlier treatment. Annual totals of the seasonally ad-
justed series can be constrained to annual totals of the unadjusted series.
For more information 5.
In addition to removing seasonality, it may also be of interest to remove
the impact of the irregular component from a time series in order to pro-
duce a trend (also known as a trend-cycle, or a short-term trend)6.
Seasonally adjusted and trend estimates are subject to revision as addi-
tional raw data become available. As the seasonal component cannot be
directly observed, it is estimated and these estimates can change as new
data points are added to the series. These revisions are an important part
of the process, and revisions should be incorporated into the production
process to ensure appropriate interpretation of the seasonally adjusted and
trend estimates.
1.6 x-13arima-seats
X-13ARIMA-SEATS was developed by United States Census Bureau in
2012. The program broadly runs through the following steps:
The series is modified for user-defined prior adjustments
The program fits a regression+ARIMA (regARIMA) model to the series
in order to: detect and adjust for outliers and other distorting effects,
to improve forecasts and seasonal adjustment; detect and estimate
additional components such as calendar effects; and extrapolate for-
wards (forecast) and backwards (backcast) an extra one to three years
of data
5see Chapter 5
6currently ONS does not publish trends
5
6 introduction to seasonal adjustment
The program decomposes the modified series to estimate and re-
move the seasonal component. X-13ARIMA-SEATS includes two meth-
ods for decomposing the modified series:
The X-11 method is a non-parametric approach that uses a se-
ries of moving averages to decompose the time series into the
three components (trend, seasonal and irregular). It does this
in three iterations, successively improving the estimates of the
three components and producing a wide range of diagnostic
statistics to describe the final seasonal adjustment
The SEATS method is a model-based approach that decomposes
the identified ARIMA model into models for components, and
also produces a wide range of diagnostic statistics.
1.7 know your series
In addition to being able to use a seasonal adjustment program and under-
stand the outputs, a proficient user should have an appreciation of factors
that are likely to affect the series being seasonally adjusted. Knowing the
background to a series will give clues as to where to look for likely prob-
lems. Some examples follow:
Is the way in which the data are collected likely to lead to any un-
usual effects? Are they collected on a non-calendar basis, or is there a
lag between the activity being measured and when this is recorded?
Has there been any change to the method or timing of data collec-
tion? This may cause trend or seasonal breaks
Is the series likely to be affected by trading days or Easter effects?
Have there been any events which are likely to cause breaks in the
series or large outliers? These could include war, the budget moving
from March to November, Britain dropping out of the Exchange Rate
Mechanism, extreme weather, industrial disputes, or other events
which may affect individual series.
6
2
OVERVIEW OF X-1 3 ARIMA-SEATS
2.1 introduction
When seasonal adjustment is embedded in to the production process, pro-
ducers of official statistics can regard seasonal adjustment as a black box
process; raw data go in and seasonally adjusted data are automatically
derived. This chapter provides an overview of the X-13ARIMA-SEATS
software and outlines some of the concepts and methods used to derive
seasonally adjusted estimates.
X-13ARIMA-SEATS (2017) is the successor to X-12-ARIMA and repre-
sents the next generation of seasonal adjustment software developed by
the U.S. Census Bureau. X-13ARIMA-SEATS can perform seasonal ad-
justment using either the non-parametric X-11 algorithm method or the
model-based Signal Extraction in ARIMA Time Series (SEATS) method.
In 2012, the UK Statistical Policy and Standards Committee (SPSC) rec-
ommended that X-13ARIMA-SEATS be the standard software for seasonal
adjustment in the Government Statistical Service (GSS). This chapter will
give an overview of the X-13ARIMA-SEATS concepts and methods. Fur-
ther resources on the use of X-13ARIMA-SEATS can be found format the
website of the U.S. Census Bureau.
2.1.1Brief review of X-13ARIMA-SEATS software development
Before introducing X-13ARIMA-SEATS, we give a brief review of the de-
velopment of X-13ARIMA-SEATS software in terms of seasonal adjust-
ment methods. The X-11 seasonal adjustment method (Shiskin, Young,
and Musgrave, 1965) was developed by the U.S. Census Bureau and has
formed the basis for most seasonal adjustment of official statistics in the
UK.
The X-11-ARIMA program (Dagum, 1980) is an improved version of
the X-11 program and was developed by Statistics Canada. It introduced
ARIMA modelling to extend a time series which will often reduce revi-
sions to seasonally adjusted series at the current end.
The next development in the X-11 family of software for seasonal ad-
justment was X-12-ARIMA. This was developed by the U.S. Census Bu-
reau and uses a modelling strategy called regARIMA (Findley et al., 1998).
Algorithms in the software that use regARIMA modelling can be used
to identify, estimate and adjust for factors which may distort estimation
7
8 overview of x-13arima-seats
of the seasonal component. In 2012, the U.S. Census Bureau launched X-
13ARIMA-SEATS as a replacement for X-12-ARIMA.
2.1.2New features of X-13ARIMA-SEATS
X-13ARIMA-SEATS combines X-12-ARIMA and SEATS, and enables sea-
sonal adjustment using either the X-11 algorithm or the SEATS decompo-
sition. The new software uses the pre-processing method of X-12-ARIMA
(regARIMA modelling) and incorporates both the X-11 algorithm of X-12-
ARIMA and the SEATS decomposition of TRAMO-SEATS1. As the main
pre-processing method of X-12-ARIMA is largely based on Time Series Re-
gression with ARIMA Noise, Missing Observations and Outliers (TRAMO),
the results of running the SEATS decomposition in X-13ARIMA-SEATS
will often be close to the results of running TRAMO-SEATS.
The fundamental difference between the X-11 algorithm and the SEATS
decomposition is that X-11 is (essentially) non-parametric, while SEATS is
parametric. The use of models in SEATS means that standard errors are
available for the seasonally adjusted series (and indeed for all components
of the time series), unlike the filter-based X-11 algorithm.
2.2 methods in x-13arima-seats
The seasonal adjustment process is summarised by the flow chart in Fig-
ure 2.1
2.2.1regARIMA models prior adjustment
X-13ARIMA-SEATS uses the pre-processing method of X-12-ARIMA which
is largely based on TRAMO and uses regARIMA models. This approach
models the time series and estimates prior adjustments before seasonal
adjustment is carried out. For example, regARIMA models are able to ad-
just for outliers and other distorting effects to improve the forecasts and
estimation of the components of the time series. The regARIMA model
can be thought of as a straightforward regression model but one in which
the error term is appropriately modelled to deal with the correlation struc-
ture that is often present in time series. The problem of autocorrelation
in a time series for ordinary least squares is that it breaks the indepen-
dence assumptions, which can lead to invalid inference. The ARIMA part
of the model is therefore important for making informed decisions on the
inclusion of regression variables.
1see Chapter 25 for details
8
2.2 methods in x-13arima-seats 9
Figure 2.1: Seasonal adjustment in X-13ARIMA-SEATS
There are a range of built-in types of regression variables available in
X-13ARIMA-SEATS including:
Outlier and trend change effects: additive (or point) outliers, Temporary
Change (TC) outliers, level shifts, ramps
9
10 overview of x-13arima-seats
Seasonal effects: calendar month indicators, trigonometric seasonal
(sines and cosines)
Calendar effects: trading day (flows or stocks), leap-year February,
length of month, moving holidays (eg. for example, Easter)
User-defined effects
Diagnostics to evaluate the fit of the model or the significance of the
regression variables are available in the X-13ARIMA-SEATS output. More
information on the regARIMA model can be found in Chapter 8.
2.2.2Seasonal adjustment the X-11 Method
X-13ARIMA-SEATS can use the X-11 method to perform seasonal adjust-
ment. The X-11 method uses a series of moving averages for seasonal ad-
justment. The following is a brief outline of the X-11 method. It provides
an overview of how the original series Yt, can be decomposed into a trend-
cycle Ct, a seasonal component Stand an irregular component It.
Trend-cycle Ct: is defined as the underlying level of the series. It is a
reflection of the medium-long term movement in a series and it is typi-
cally the result of influences such as population growth, general economic
development and business cycles. It refers to the generally smooth deter-
ministic movement in a time series.
Seasonal component St: includes variations which repeat approximately
periodically with a period of one year and which evolve more or less
smoothly from year to year. Calendar variations, such as Easter effects,
are also included within the seasonal component.
Irregular component It: contains those parts of the time series that can-
not be predicted and are effectively the residual component after the iden-
tification of the trend and seasonal components. It may include sampling
errors and unpredictable events like strikes and floods.
The default decomposition of a time series in X-13ARIMA-SEATS is the
multiplicative decomposition; Yt=Ct×St×It. An alternative decompo-
sition is the additive decomposition where all the components are related
additively. In the multiplicative model, Stand Itare scale-free numbers
varying about a level of 1(or 100%); in the additive model Stand Itare in
the same units as the original series and vary about a level of zero2.
The X-11 process can be described by the following sequence of steps3.
Assuming that there is a multiplicative relationship between the compo-
nents, the steps are as follows:
2for more information on the choice of decomposition see Chapter 12
3for a full description see Ladiray and Quenneville (2001)
10
2.2 methods in x-13arima-seats 11
1. A preliminary trend-cycle (C
t) is obtained by applying a trend mov-
ing average to the original series (Yt)
2. This initial estimate of the trend is removed from the original esti-
mate to give a de-trended time series denoted by: SIt=St×It=
Yt(C
t)
3. Extreme values are then identified by an automatic process and re-
placed in the SIttime series
4. A seasonal moving average is then applied to the modified SIttime
series for each month (or quarter) separately to give a preliminary
estimate of the seasonal component ˆ
St
5. Dividing Ytby ˆ
Stgives a preliminary seasonally adjusted series,
SA
t=Yt
ˆ
St
6. This process is then repeated, using a Henderson moving average
(Henderson 1916) to estimate the trend-cycle in step 1
For an additive decomposition, the division in step 2and step 5is replaced
with subtraction.
The detailed steps of the X-11 seasonal adjustment process mentioned
above are described as follows.
Step 1: Preliminary estimate of the trend
Moving averages can have a smoothing effect and some of these can re-
move seasonality in data. These are applied to the original series to give a
preliminary estimate of the trend. For a monthly series a 2x12 moving av-
erage is applied while for a quarterly series a 2x4moving average is used.
Moving averages are described in more details in Chapter 13. A 2x12 mov-
ing average is centred at the month t and uses the previous six months, the
current month (t) and the subsequent six months. The weights of the mov-
ing average are symmetrical. The same weight is given to months which
are the same distance from the current month. The effect of a 2x12 aver-
age on a monthly series is to remove stable annual variation and reduce
purely random variance by a factor of 12.5while leaving any linear trend
unchanged.
Step 2: estimate the seasonal and irregular components
Once the preliminary estimate of the trend Ctis known, it is possible
to estimate the remaining SItcomponent. This is done by dividing the
original data (Yt)by the first estimate of Ctif a multiplicative model
(Yt=CtxStxIt)is used or by subtracting Ctfrom the original data if
11
12 overview of x-13arima-seats
an additive model (Yt=Ct+St+It)is used. The Irregular to Seasonal
Ration (also I/S) (SI) may be plotted for each quarter/month separately.
Note that they are presented in the output from the software as percent-
ages not ratios for a multiplicative decomposition and differences for an
additive decomposition. We will refer to them as SI ratios. Figure 2.2shows
an example of SI ratios for January.
Figure 2.2: January SI ratios for retail sales in non-specialised stores (predomi-
nantly food)
The 100% line at the top of the graph represents the new trend of the
series once Cthas been removed from Yt. This diagram clearly shows that
the January SI values are all below trend, a typical example of a seasonal
effect. The graph of the SI ratios is a useful tool that should be used in
analysing the seasonal behaviour, especially to identify breaks in the se-
ries.
Step 3: Extreme values are then identified and replaced in the "SI" series
X-13ARIMA-SEATS identifies and temporarily replaces outliers in the SI
graphs for each month. This reduces any distortion of the seasonal ad-
justment. In Figure 2.3the outliers are temporarily replaced by the points
shown in pale blue.
The routine to identify and replace outliers is used several times to get
progressively better estimates of the size of the outliers. The following
steps are used:
12
2.2 methods in x-13arima-seats 13
Figure 2.3: January SI ratios with replacement values
A rough estimate of the irregular is made, from the combined seasonal-
irregular component
A standard deviation is calculated for each 5year moving span of the
irregular component and used as the standard deviation for the mid-
dle year of the five. For the first two and last two years the standard
deviation of the nearest available five year span is used
Where any irregular is more than 1.5standard deviations from zero
(or from 100% for a multiplicative model), the SI value for that point
is considered extreme and partially or fully replaced. The extreme
value is given a weight which depends upon how extreme the ir-
regular is, as shown in Figure 2.4. The default boundaries on the
standard deviation (known in the software as sigma limits) are 1.5
and 2.5. These limits can be changed by the user.
The modified SI ratios are used for estimating the seasonal component
so that extreme values do not distort the estimate. However, outliers re-
main in the final seasonally adjusted estimate.
13
14 overview of x-13arima-seats
Figure 2.4: Outlier identification and weighting
Step 4: A seasonal moving average is applied to the modified SI series for
each month/quarter separately to give a preliminary estimate of S and
hence I
A seasonal moving average (a 3×3in the first part of iteration B and a
3×5in the second part of iteration B) is then applied to the SI series to
estimate the seasonal factors. If the derived moving averages represent the
seasonal component, the irregular component is defined by the deviation
of each point from the moving averages.
This process is repeated for each month/quarter. An example of the
January SI ratios and moving average values is shown in Figure 2.5.
Figure 2.5illustrates the results of the application of a 3x3moving aver-
age (pale blue line) to the modified January SI ratios. It shows the graph-
ical representation of the separation of the seasonal and irregular compo-
nents.
Step 5: Dividing Y by S gives a preliminary seasonally adjusted series,
denoted SA1
After the seasonal factors have been estimated, the seasonally adjusted
series can be derived. The original series Ytis divided by Stto give a
preliminary seasonally adjusted series Ct×It(if a multiplicative model
is used). In case of an additive model, the original series Ytminus the
seasonal component Stgives an estimate of the seasonally adjusted series
14
2.2 methods in x-13arima-seats 15
Figure 2.5: January SI ratios with moving average values
Ct+It. This seasonally adjusted series is referred to as SA1since it is just
the result of the first iteration.
Step 6: Repeat seasonal estimation with improved trend estimates
This process from steps 1to 5is then repeated, but this time the trend is
estimated from the SA1series by applying a Henderson moving average
(such moving averages are very good at estimating trends, but can only be
used on series which do not exhibit seasonality).
Two more iterations X-11: parts C and D
The output of the steps described above is not regarded as the final set
of estimates. X-13ARIMA-SEATS carries out this entire process (that is i.e
steps 1to 6, including two estimations of the seasonal component) twice
more. For these estimations, however, the starting point is not the raw
series Ytbut a modified Ytwith extremes removed or reduced. The final
output of the third iteration (Part D) is the final set of time series estimates.
2.2.3Seasonal adjustment - the SEATS method
X-13ARIMA-SEATS can also use the SEATS method to perform seasonal
adjustment. In contrast to the non-parametric X-11 adjustments, SEATS
is a model based methodology for seasonal adjustment and is used for
15
16 overview of x-13arima-seats
decomposing a time series in to trend-cycle, seasonal, transitory and ir-
regular components. The SEATS method was developed from the work of
Cleveland and Tiao (1976), Box, Hillmer, and Tiao (1978), Burman (1980),
Hillmer and Tiao (1982), Bell and Hillmer (1984), Maravall and Pierce
(1987) and Maravall (1988) in the context of seasonal adjustment of eco-
nomic time series. The TRAMO-SEATS software has been developed pri-
marily by Gómez and Maravall (2001) of the Bank of Spain.
X-13ARIMA-SEATS uses the pre-processing method of X-12-ARIMA,
which is largely based on TRAMO. After prior adjustment, the Auto Re-
gression (AR) and Integrated (I) terms are allocated to ARIMA component
models. The AR process relates recent values of trend and seasonality to
past values. Terms are allocated according to their magnitude and fre-
quency. If the effect is large enough and at the correct frequency, the effect
is allocated to the model for trend or seasonal, otherwise it is allocated
to the model for the transitory component. Identifying Moving Average
(MA) orders of component models via partial fraction decomposition is
a difficult part of the process. The required condition for this process is
that variances of components cannot be negative (“admissible” decompo-
sition). One of the problems is that no unique admissible decomposition
can distribute noise amongst components in any way. The solution for this
is to allocate all white noise to the irregular component (“canonical” de-
composition), then components can be estimated from their models. The
main method is to use standard signal extraction techniques, for exam-
ple, the Wiener-Kolmogorov filter. The filter is symmetric which requires
forecasts (and backcasts) of observed series and allows standard errors of
components to be obtained (confidence intervals).
2.3 differences between x-12-arima and x-13arima-seats
The inclusion of the SEATS method of seasonal adjustment is the only
substantial change between X-12-ARIMA and X-13ARIMA-SEATS.
However, results from running the X-11 algorithm in X-12-ARIMA and
X-13ARIMA-SEATS may differ because of additional functionality. The ex-
tra functionality and improvements include:
new spectrum spec with options to change criteria for identifying
peaks, change span, control print and save options
new regressors stock calendar regressors (constrained stock TD,
end-of-month stock Easter), and up to five groups of user-defined
holiday regressors
extension of regressor set tested by aictest=td in the regression spec
from {no effect, td} to {no effect, td,td1coef}, types=all in the outlier
spec from {ao,ls,tc} to {ao,ls,tc,so} where so is a seasonal outlier
16
2.4 example:decomposing the original time series 17
optional lognormal adjustment for forecasts
new diagnostics model-based F-tests for stable seasonality (more
reliable than M7) and for trading day, Akaike Information Criterion
Corrected (AICC) test for length of month and leap year regressors
improved performance of sliding spans and history specs in SEATS,
and incorporation of HTML output from SEATS.
2.4 example:decomposing the original time series
Figure 2.6shows an original series and the trend-cycle, seasonal and irreg-
ular components. The purpose of seasonal adjustment is to estimate and
remove the seasonal component from the original data to give seasonally
adjusted estimates.
Figure 2.6: Graphical representation of time series components
2.5 diagnostic checking
As indicated in the flowchart in Figure 2.1diagnostic checking is impor-
tant at the pre-processing stage and following seasonal adjustment. Both
the regARIMA modelling and the X-11 or SEATS decomposition should
be checked by the user for accuracy and improved where necessary. There
should not be any residual seasonal or calendar effects in the published
17
18 overview of x-13arima-seats
seasonally adjusted series or in the irregular component. If there are resid-
ual seasonal or calendar effects, as indicated by relevant diagnostics, the
model and regressor options should be checked in order to remove season-
ality. Note that the issue of residual seasonality equally applies to directly
and indirectly seasonally adjusted estimates4.
Even if no residual effects are detected, the adjustment may be unsatis-
factory if the seasonally adjusted estimates are subject to large revisions
when they are recalculated as new data become available. Such instability
should be measured and checked. X-13ARIMA-SEATS includes two types
of stability diagnostics: sliding spans and revisions history
X-13ARIMA-SEATS provides many useful diagnostics that are discussed
in more detail in subsequent chapters of this guide.
4see Chapter 6
18
3
H O W T O U S E X - 1 3 ARIMA-SEATS WITH WIN X-1 3
3.1 downloading and installing x-13arima-seats and win
x-13
The files for X-13ARIMA-SEATS and the front end Win X-13 can be down-
loaded from the website of the U.S. Census Bureau.
X-13ARIMA-SEATS can be run in an interactive file editor such as Win
X-13 or through other software which can call the X-13ARIMA-SEATS ex-
ecutable, for example R. It is recommended to use X-13ARIMA-SEATS
through Win X-13 as Win X-13 automatically generates diagnostic sum-
maries and graphical output.
Creation of spec files, running of X-13ARIMA-SEATS and analysis of
the output can all be performed using Win X-13. Win X-13 is a commonly
used graphical user interface for X-13ARIMA-SEATS.
NOTE: The installation of programs to government de-
partment computers is governed by departmental policy
which must be adhered to.
3.2 using x-13arima-seats with win x-13
Detailed instructions on how to use X-13ARIMA-SEATS are available from
the X-13ARIMA-SEATS Reference Manual. The following is a condensed
guide. To use X-13ARIMA-SEATS you will need an executable file. Two
additional files must also be created. It is often simpler to have these in
the same folder but not necessarily the same folder as the folder with the
executable file:
1. One file containing the data that are to be seasonally adjusted using
X-13ARIMA-SEATS named, for example, “myfile.dat”.
2. The second file contains the instructions to seasonally adjust the data
series, and is known as the specification file or spec file. It is given a
name such as “myfile.spc”.
Both files can be in text format. They can easily be created using ei-
ther the Notepad text editor or, in the case of the spec file, WinX13 (the
19
20 how to use x-13arima-seats with win x-13
front end to the X-13ARIMA-SEATS software). Once these files have been
created, X-13ARIMA-SEATS can be used to perform seasonal adjustment.
3.2.1The data file
The data file is simply the raw data that have to be seasonally adjusted.
The data can be in a number of different formats as described in the user
manual X-13ARIMA-SEATS (2017). Below we briefly describe free format,
datevalue format, and x13save format.
Free format
This is a simple format. It comprises a single column of data with new
numbers of a new line. There are no labels or headers in this format. An
example of free format data is given below:
89814.18
85582.54
85059.04
85880.88
97711.15
78266.99
84479.21
79941.65
If the data are in free format, then a start statement with the start date
of the series is required in the series specification.
Datevalue format
A file in datevalue format includes dates. The delimiter that separates each
field may be a tab or a space. An example of datevalue data is provided
below. In this example the delimiter between the year and the month, and
between the month and the value, is a tab.
1991 1 89814.18
1991 2 85582.54
1991 3 85059.04
1991 4 85880.88
1991 5 97711.15
1991 6 78266.99
1991 7 84479.21
20
3.2 using x-13arima-seats with win x-13 21
In this case the start argument in the series specification is not required.
Labels are not required within the data file, but they are permitted.
x13save format
A file in x13save format includes dates. This may also be referred to as
x12save format. A file may only be produced in x13save format by X-
13ARIMA-SEATS. An example of x13save data is given below:
date mydata.a1
199101 8.98E+04
199102 8.56E+04
199103 8.51E+04
199104 8.59E+04
199105 9.77E+04
199106 7.83E+04
199107 8.45E+04
199108 7.99E+04
In this case the start argument in the series specification is not required.
Labels are not required within the data file, but are allowed.
3.2.2The specification file
To use X-13ARIMA-SEATS a command file called the specification file or
spec file, must be created. A spec file is a text file used to specify program
options. The name of the spec file must end with a “.spc” extension. A spec
file contains a set of functional units called specifications or specs that X-
13ARIMA-SEATS reads to obtain required information for the time series,
such as the decomposition model to be used, the analysis to be performed
and the desired output. Each spec controls options for a specific function.
For example, the series spec specifies the original data to be input and the
span to be used in the analysis, whereas the transform spec specifies any
transformation and any prior adjustments to be applied.
An X-13ARIMA-SEATS spec file must begin with a series or a compos-
ite spec1, whilst the other spec can be entered in any order. Note that not
all specs are required in a spec file. A general input syntax of a spec file is
presented below:
specificationname{
1for more information about the composite spec see Chapter 20
21
22 how to use x-13arima-seats with win x-13
argument1 = value
argument2 = (value1 value2 value3)
argument3 = "A string value"
argument4 = 2003.9 # The dates 2003.9 and 2003.SEP are equivalent
for monthly series
}
# This symbol is followed by a comment that is not meant to be
executed.
When writing a spec file, one should note that:
Dates are in the format yyyy.period (for example 2003.9or 2003.sep)
If an argument has 2or more values, these must be enclosed in paren-
theses
Character values, such as titles and file names, should be enclosed in
quotation marks
Everything on the line following the "#" symbol is treated by X-
13ARIMA-SEATS as a comment
The maximum number of characters read on a line is 132
Arguments can be set within each spec. Arguments define the function
that X-13ARIMA-SEATS uses, and if an argument is not specified, a de-
fault value is assigned. Arguments can be written in any order within
the spec, using upper, lower, or mixed case as X-13ARIMA-SEATS is not
case sensitive. The spec file also includes the name and the path of any
optional files containing data for the time series being modelled, data for
user-defined and predefined regressors, values for any user-defined prior
adjustments, and model types to try with the automatic model procedure.
These names and paths are listed in appropriate specs. An example of a
simple spec file is shown below:
series{
title = "Example Specification"
start = 1994.1
period = 4
name = "Default"
file = "c:\research\test.dat"
}
transform{
function = log
file = "c:\research\testtp.tpp"
22
3.3 example of use of x-13arima-seats with win x-13 23
type = temporary
}
arima{
model = (0,1,1)(0,1,1)
}
regression{
aictest = (Easter)
}
x11{}
The above spec file includes the series,transform,arima,regression
and x11 specifications. The series spec provides X-13ARIMA-SEATS with
a file name and path, indicating where the original data are stored. The
transform spec takes the logarithms of the series, and provides the name
of a file containing the temporary priors to prior adjust the series. The
file specifies an ARIMA (0 1 1)(0 1 1) model, using the arima spec. The
regression spec tests the significance of regression variables, known or
suspected to affect the series, as indicated in the regression specification.
Here {aictest=(Easter)} tests whether an Easter variable should be included
within the regARIMA model specified. Finally, the x11 spec generates sea-
sonal adjustments from the default selection of seasonal and trend filters.
To include additional options in a specification file, please refer to ap-
propriate chapters in this guide or for comprehensive details see the X-
13ARIMA-SEATS (2017) or contact TSAB for further guidance.
3.3 example of use of x-13arima-seats with win x-13
In the following example we will use the time series of visits abroad made
by UK residents over the period January 1986 to August 2013 inclusive
from the International Passenger Survey. The series is saved into a text
file in free format; that is only the values are saved with no headers or
labels. The data are copied and pasted into a Notepad document and then
saved in the working folder (here the My Documents folder) as “UKVis-
itsAbroad.dat”. Note that the quotation marks are used so that the file can
be saved directly as a “.dat” file rather than first saving as a Notepad file
and then changing the file extension to “.dat”.
Now that the data file has been saved in the correct format the spec file
must be written. Open Notepad and write the settings as below. Notice
that the spec file is saved as “UKVisitsAbroad.spc”, by saving the file using
the double quotation marks, the format can be set as “.spc” the correct
format for spec files.
23
24 how to use x-13arima-seats with win x-13
Figure 3.1: Saving the “.dat.” file
The spec file used in this example is shown in Figure 3.2. The series spec
tells X-13ARIMA-SEATS where the “.dat” file is, what format the file is
and when the series starts. The transform spec tells X-13ARIMA-SEATS to
choose the decomposition automatically. The regression and outlier specs
tell X-13ARIMA-SEATS to test, and were found significant, to adjust for
prior adjustments. The pickmdl spec chooses the best ARIMA model from
the list of ARIMA models in the “x12.mdl” file. Alternatively, the automdl
spec can be used. The x11 spec performs the seasonal adjustment and
history and slidingspans specs perform diagnostic checks. For more infor-
mation on specs see section 7of the X-13ARIMA-SEATS manual (USCB
2017)
Figure 3.2: Automatic spec file
24
3.3 example of use of x-13arima-seats with win x-13 25
Once the spec file has been written and saved, Win X-13 can be opened
to begin the seasonal adjustment process. Once Win X-13 has been opened,
navigate to the working folder and select the spec file. Also ensure that the
option to view output files and diagnostics is selected. It is also useful to
run Win X-13 in graphics mode.
Figure 3.3: Running the automatic spec file
Once the spec file has been right clicked and the option “Run” selected,
X-13ARIMA-SEATS will perform the automatic seasonal adjustment and
provide charts, output and diagnostics. These are shown below from Fig-
ure 3.4to Figure 3.6.
Figure 3.4: Output file
25
26 how to use x-13arima-seats with win x-13
Figure 3.5: Charts for automatic spec file
Figure 3.6: Diagnostics for automatic spec file
The automatic spec file recommends performing seasonal adjustment
on this series using:
an additive decomposition (General tab in the diagnostics window)
(0 1 1)(0 1 1) ARIMA model (not shown in figure Figure 3.6but found
in the "Model info" tab in the diagnostics window)
prior adjustment for Easter (Easter[15]) and trading days (td1coef)
(not shown in Figure 3.6but found in the "Model info" tab in the
diagnostics window)
a 3x5seasonal moving average and a 13-term trend moving average
(not shown in Figure 3.6but found in the "x11" tab in the diagnostics
window).
26
3.3 example of use of x-13arima-seats with win x-13 27
To fix these settings open the spec file and change the individual specs
as below. The changes are highlighted. The user should check the diag-
nostics to determine whether the seasonal adjustment is performing ade-
quately and make any necessary adjustments. Once adjustment have been
made and the quality of the seasonal adjustment is adequate, this spec file
is now ready for use in production for the next 12 months until the next
seasonal adjustment review is due. If there are any changes to or shocks
in the series before the next scheduled review, the parameters should be
reviewed to reflect this.
Figure 3.7: Final spec file
27
28 how to use x-13arima-seats with win x-13
3.4 summary
The seasonal adjustment program, X-13ARIMA-SEATS, and the soft-
ware front end, Win X-13, can be downloaded from the website of
the U.S. Census Bureau
A spec file can be used to specify parameters for seasonally adjust-
ing a time series (advice on setting parameters is provided in the
remainder of this guide).
28
4
LENGTH OF THE SERIES
4.1 introduction
Any series of more than three years in length can be seasonally adjusted
by X-13ARIMA-SEATS. However, if the series is very short, the program
does not have a large number of data points to work with, so it may have
problems finding significant evidence of, for example, seasonality, Easter
effects or trading days. Very short series are likely to have large revisions
as new data have the capacity to greatly change the estimates of the sea-
sonal factors. On the other hand, a very long series will have data which
will not relate to the pattern of the current end of the series. For exam-
ple, how much would 1980s data reflect the current pattern? What new
information would it give which would still be accurate?
4.2 how long a time series does x-13arima-seats need?
X-13ARIMA-SEATS has a few absolute minimum requirements for certain
functions to work:
3years of data is the minimum for X-13ARIMA-SEATS to model or
do any seasonal adjustment
5years and 3months (5years and 1quarter) of data are needed
for X-13ARIMA-SEATS to automatically fit an ARIMA model and to
calculate correctly all the criteria to test the models (especially the
average forecast error for the last 3years). If there are fewer data
points, then the user can impose their own model
There must be at least 5years of data including the forecast for the
automatic selection of the seasonal moving average to work, and to
allow for evolving seasonality. Constant seasonality is used if there
is less than 5years of data
X-13ARIMA-SEATS uses all of the data available when fitting an
ARIMA model unless the modelspan argument is used.
29
30 length of the series
4.3 seasonally adjusting short series
Short series are considered to be those where less than 5complete calendar
years of data are available. X-13ARIMA-SEATS will seasonally adjust the
series assuming strict stable seasonality, so that the seasonal factors do not
change over the span of the series. If a short series needs to be seasonally
adjusted, please refer to the following guidelines:
If less than 3years of data are available, the seasonally adjusted ver-
sion of the series should not be published until more observations
are available. At least 3years of data are required for X-13ARIMA-
SEATS to operate. It is important to monitor the behaviour of the
series, and some personal judgement will probably be required. Use
external information or patterns in related series if possible to sea-
sonally adjust the series
If 3-5years of data are available, consider not publishing the sea-
sonally adjusted version of the series until more observations are
available. X-13ARIMA-SEATS can use ARIMA modelling or provide
trading day and Easter adjustments, but they are generally of very
poor quality and subject to large revisions as future observations
become known. The option of constraining of seasonally adjusted
series to the raw annual totals is not available.
4.3.1Methods available to seasonally adjust short series
Three options are available to seasonally adjust short series with 3to 5
years of data. These are:
1. To use the arima spec in X-13ARIMA-SEATS to forecast and backcast
the series in order to have enough data to run the seasonal adjust-
ment
2. To seasonally adjust the actual data with no ARIMA modelling (us-
ing x11 spec only)
3. To link the series with another that covers a longer time period and
then seasonally adjust the resulting linked series
The first method is to use the arima spec to forecast and backcast theThe ARIMA
extrapolation
method data. Because the automatic model selection operates only with more than
5years of data, a simple form of model, such as a (0,1,1)(0,1,1) with a
log transformation if appropriate, should be fixed in the arima spec. The
forecast spec should have 1to 2years of maxlead in order to have a se-
ries of 5to 6years of data. The x11 spec can be run with the automatic
30
4.3 seasonally adjusting short series 31
selection of the seasonal moving average to make sure that the selected
moving average is the most appropriate for the behaviour of the seasonal
component. Trading day and Easter regressors can be used to estimate
those effects, but it should be kept in mind that the adjustments might be
of very poor quality and subject to large revisions as future observations
become known.
The ARIMA extrapolation method has some limitations that need to The X11 spec
without ARIMA
modelling
be taken into account. The use of the (0 1 1)(0 1 1) model means that
the forecasts will have a stable seasonal pattern, which will necessarily
be the average seasonal pattern of the actual data. Therefore, the effect
of adjusting the extrapolated data will be much the same as adjusting
the actual data without extrapolation. In this situation, it makes sense
simply to use the x11 spec without any modelling. The only drawback to
this method is that it is not possible to use ARIMA modelling to identify
outliers or calendar effects; however, such identifications are unreliable in
short series, as mentioned above.
The third option available is to link two series together to provide a Linking
longer series of 5years in length. Linking involves using a related series
(the indicator series), which has the same general behaviour as the short
series, to extrapolate the series back. This option is appropriate only where
an indicator series is available for months/quarters before the start of the
short series. Where an overlap is available between the two series, they
can be linked to provide a longer series that can be adjusted using X-
13ARIMA-SEATS. Advice on the linking of series is available from TSAB.
Choice of methods
The choice of which approach to follow depends upon a number of factors.
Options 1and 2may be easier to implement; thus if time is limited
one of these options may be more appropriate
Option 3can be used only if there is an indicator series which can be
used to extend the short series further back. The effectiveness of this
method will depend upon how similar the behaviour of the indicator
series is to the short series being adjusted
More advice is available from TSAB.
Seasonal adjusted short series are likely to be subject to large revisions
as new data become available. Outliers and breaks will have a particularly
large effect on short series. It is especially important that, if they exist,
these effects are identified (usually through knowledge of the series) and
removed.
31
32 length of the series
4.4 what is the recommended length of a time series for
seasonal adjustment?
Although anything under 5years is considered short, it is desirable to have
more than 5years to ensure acceptable stability when the series is updated
with new data. At least 10 years is necessary to ensure that the adjustment
of the first year is unlikely to be revised extensively. If the series has be-
tween 5and 10 years of data, it may be modelled and adjusted in the same
way as for a longer series, but it must be recognised that there may well be
revisions (perhaps because of changes of model, recognition of previously
undetected breaks, revisions to the existing data, or very unseasonal new
data affecting the moving averages) when more data are added.
At the other extreme, a long series may have discontinuities or large
changes in seasonal pattern. Regressors should be included in the re-
gARIMA model if there is a trend or seasonal break in the series history.
One criterion for using these regressors is whether there are enough data
before and after the break to enable reliable identification. Among other
things, this depends on how irregular the series is: the greater the volatility,
the more data will be needed.
Because there are so many variable factors, it is not possible to lay down
any hard and fast rules as to how many years of data are necessary to ob-
tain a publishable adjustment. Anything under 5years is very risky, and
should be published with strong warnings and only if the series is of such
high importance that some guidance on its evolution is essential. Another
factor to consider is how clean the data are. If the data appear to show
strong seasonality, there is more reason to trust the models suggested by
X-13ARIMA-SEATS. Between 5and 10 years the series becomes more re-
liable, but there are still risks. It is best to provide additional warnings if
the series is published and there are large revisions on update. With 10
or more years the presumption is that adjustments should be published;
this will be overridden only if there is some serious problem indicated by
the diagnostics, for instance an indication of serious instability from the
sliding spans analysis.
32
5
CONSISTENCY ACROSS TIME
5.1 introduction
The pattern of seasonality and other cyclical effects such as trading days
and moving holidays changes from year to year. When these effects are
removed from the time series to produce the best seasonally adjusted esti-
mates, the changing patterns cause an inconsistency: the annual totals of
the seasonally adjusted series are different from the annual totals of the
original series.
A separate inconsistency can sometimes arise when monthly and quar-
terly versions of the same series are seasonally adjusted independently,
resulting in a difference between the totals of the monthly seasonally ad-
justed series and the quarterly series.
In both cases it may be necessary to remove the inconsistencies by con-
straining, that is forcing the totals to match up. If so, the seasonally ad-
justed series can be perturbed slightly using a mathematical method called
benchmarking. The perturbations will reduce the quality of the seasonally
adjusted estimates slightly, so should not be applied unless absolutely nec-
essary.
Constraining is most often necessary for the following reason. When
the seasonally adjusted estimates are used as a small part of a larger sys-
tem, such as in National Accounts, then it is often essential that the an-
nual totals of the seasonally adjusted estimates be forced to be equal to
the totals for the original series. The differences between constrained and
unconstrained are smoothly spread out, and non seasonal. Therefore, the
quality of the seasonal adjustment is not removed in this process, but there
are minor tweaks to the trend to the estimates to be incorporated into the
larger system of accounts.
In order to constrain the totals of the seasonally adjusted estimates to
the annual totals of the original series the force spec should be included
within the spec file. If it is necessary to constrain monthly estimates to
quarterly, then a separate program must be used because this type of
constraining cannot (at the time of writing) be accomplished within X-
13ARIMA-SEATS.
33
34 consistency across time
5.2 annual constraining
5.2.1What is annual constraining?
In general, the annual total of seasonally adjusted estimates is not exactly
equal to the annual total of the original estimates. There are procedures
in the X-13ARIMA program that ensure that the seasonally adjusted esti-
mates and the original estimates have a similar average level over any 12
month or four quarter period, but the agreement is rarely exact. If exact
agreement is required, X-13 ARIMA-SEATS can use a routine that con-
strains the seasonally adjusted estimates so that the annual totals equal
those of the original estimates. It does this in a way that closely preserves
the period-to-period changes observed in the unconstrained seasonally ad-
justed estimates.
There is no mathematical reason why the annual totals of the original es-
timates and seasonally adjusted estimates should agree. Indeed, if trading
day adjustments are made, there are good reasons why they should not.
This is because the seasonally adjusted estimates have been scaled to an
average pattern of trading days, while the original estimates correspond
to the actual pattern of days in the year. However, these constraints are
often applied, usually to make series more consistent for users.
Occasionally it may be desirable to constrain the seasonal adjustment so
that financial years, or some other yearly totals, of the seasonally adjusted
estimates and the original estimates are equal. This can also be achieved
using X-13ARIMA-SEATS.
5.2.2When should annual constraining be applied?
The main reason for applying annual constraining is so that users are pre-
sented with a consistent set of annual totals for a time series, regardless of
whether they are looking at the original or seasonally adjusted estimates.
The trade-off is that there is a loss of optimality in the seasonal adjustment,
particularly when seasonality is evolving quickly, or when trading day ef-
fects are large. The following four criteria should be used when deciding
whether or not to apply annual constraining.
1.Use: Consider how the data are used and any stated preferences of
users. This criterion will sometimes override the other criteria. For
example, if the series are part of the National Accounts dataset they
will probably need to be constrained
2.Concept: Decide whether annual constraining makes conceptual sense
for your time series. Consider, for example, how the timing of the ob-
servations in your time series relate to calendar years, think carefully
34
5.2 annual constraining 35
about the way the data are collected and compiled and what they
represent. It may be apparent from this that annual constraining is
inappropriate for your series. Consider the following examples: the
observations in the Labour Force Survey are a sequence of overlap-
ping 3month averages; Retail Sales data are collected on a 4,4,5
week pattern rather than a calendar month basis; prices, earnings,
claimant count and many other series are stock series measured at
a point in time, for which averaging to the same annual averages
might have little presentational importance
3.Continuity: If a time series is already being seasonally adjusted, then
strong reasons are needed for changing the approach to constraining.
It would be a poor policy to allow switching between applying and
not applying annual constrain every few years
4.Effect: Look at the E4table of the X-13ARIMA-SEATS output to see
if the differences, or ratios if multiplicative, between the constrained
and unconstrained data are large. If they are negligible and the other
criteria are satisfied, then annual constraining may be preferable.
5.2.3Annual constraining and revisions
When annual constraining is applied, it is important to ensure that the
revision policy takes this into account. For example, a revision policy that
revises the last month every time a new monthly observation is added to a
series would change the additivity of the previous year when January data
are published and December is revised. It is primarily for this reason that
the revision policy for the National Accounts datasets only ever involves
revising observations in the current year.
5.2.4Annual constraining in X-13ARIMA-SEATS
By default, X-13ARIMA-SEATS will not adjust the seasonally adjusted val-
ues to force agreement. If the user wants to force the annual totals, the
force specification should be used. At least five years of data is required
to use the force specification. Care should be taken when using the force
specification in conjunction with the composite specification1.
A typical application of annual constraining is shown in the spec file
below. Some values for the series, transform, arima, forecast and x11 spec-
ifications are shown for completeness but are not relevant to this discus-
sion. The force specification is shown with typical options; at the time of
writing these are the values used by ONS when constraining.
1see Chapter 20
35
36 consistency across time
If the parameter round is specified as round=no, it is guaranteed that
the totals agree, but the totals as printed in the output may not due to
rounding effects. If it is required that the totals should agree as rounded
and as printed then use round=yes. Unless it is known in advance how
many figures will be required in the final published figures, the recom-
mended option to use is round=no.
Example specification file, using the force specification to
constrain annual totals.
series{
title = "Example of constraining the annual totals"
start = 1994.1
period = 4
file = "mydata.txt"
}
transform{
function = log
}
arima{
model = (0,1,1)(0,1,1)
}
forecast{}
force{
type = denton
round = no
usefcst = no
mode = ratio
save = saa
}
x11{
appendfcst = yes
trendma = 7
seasonalma = s3x5
save = d11
}
36
5.3 statistics 37
5.2.5Financial year constraining
For some series it may be desirable to constrain the seasonal adjustment
so that financial year totals (or some other yearly totals) for the seasonally
adjusted and the original data are equal. The default operation of the force
specification uses calendar years, but there is an optional parameter start
which allows the use of any other year. To use the standard UK financial
year for a monthly series, include the specification start=april or start=apr;
for a quarterly series, use start=q2.
If calendar and financial year constraints are required, two separate con-
strained time series could be produced using X-13ARIMA-SEATS. This
requires two separate seasonal adjustment runs, with specification files
differing only in the value of the option start. The peculiarity of produc-
ing two different constrained series starting from the same unconstrained
series should lead to questioning whether such a requirement is sensible.
Note that it is mathematically possible to constrain seasonally adjusted es-
timates to agree with the original estimates over both calendar and finan-
cial years. This would require the use of an alternative program. The user
should be careful when adding additional constraints as this reduced the
degrees of freedom in the optimisation problem and could lead to undesir-
able effects. Again, the user should question whether such a requirement
is sensible.
The user should consult section 7.6of the X-13ARIMA-SEATS manual
(USCB 2017) for other options when constraining annual totals.
5.3 statistics
If the force spec is used, an extra table, D11A, appears in the output. This
contains the seasonally adjusted series constrained to annual totals. An ex-
tract from a run of X-13ARIMA-SEATS is shown below. Compare table A1
the original time series data, with table D11A the seasonally adjusted
series with constrained yearly totals, and note that the total for each year
is the same, except the last year, which has data for only three quarters so
cannot be constrained.
37
38 consistency across time
1st 2nd 3rd 4th TOTAL
2009 1856.93 1963.16 2074.00 1923.90 7817.98
2010 1777.60 1600.36 1852.92 1795.65 7026.54
2011 1727.91 1911.78 2025.32 1871.16 7536.17
2012 1984.75 1809.97 1812.81 5607.53
Table 5.1: A1time series data (for the span analysed)
1st 2nd 3rd 4th TOTAL
2009 1889.94 2031.42 2043.76 1852.87 7817.98
2010 1808.59 1670.71 1818.57 1728.66 7026.54
2011 1757.79 1979.68 1991.44 1807.26 7536.17
2012 2015.25 1875.00 1776.94 5667.18
Table 5.2: D11.A final seasonally adjusted series with forced yearly totals denton
method used.
5.4 consistency
Another way in which non-additivity over time can arise in seasonal ad-
justment is when monthly and quarterly series are seasonally adjusted
independently. The seasonally adjusted quarterly estimates and the sum
of the seasonally adjusted estimates of the correspondent months can be
very different, giving rise to extreme non-additivity between seasonally
adjusted components and totals.
This inconsistency can result in a phenomenon similar to the one out-
lined in Chapter 6. The key difference is that rather than a seasonal fea-
ture moving between components of a total, it moves between months of
a quarter.
For example, if all firms brought forward payment of bonuses to Febru-
ary rather than March in a particular year, it would be recognised as
seasonality in the quarterly seasonal adjustment, but would not in the
monthly seasonal adjustment. A similar phenomenon may be observed in
energy series, where peaks in energy consumption switch between months
according to the weather patterns. The weather also accounts for similar
timing differences in harvests, affecting many agricultural statistics.
Under such circumstances there are three methods to seasonally adjust
monthly and corresponding quarterly series:
38
5.4 consistency 39
Indirect seasonal adjustment of the quarterly series by summing the
corresponding seasonally adjusted months, which may result in sub-
optimal seasonal adjustment of the quarterly series
Direct seasonal adjustment of the quarterly and monthly series, which
may result in a loss of additivity
Direct seasonal adjustment with constraining to ensure additivity,
which may lead to a distortion of the monthly series
A decision about which method to use should be based on careful con-
sideration of the uses of the series and analysis of the technical charac-
teristics of the series involved. It is not possible to constrain monthly to
quarterly series within X-13ARIMA-SEATS. For advice on the use of the
force specification in the context of annual constraining, contact TSAB.
39
6
AGGREGATE SERIES
6.1 introduction
An aggregate series, also known as a composite series, is a series com-
posed of two or more other (component) series. The component series can
be combined in a variety of ways to form the aggregate series. An ag-
gregate series itself may also be a component series of another aggregate
series, therefore it is possible to have different levels of aggregation.
Many of the time series that are seasonally adjusted by the Office for
National Statistics are aggregate series, and therefore it is important to un-
derstand how to deal with the seasonal adjustment of them. For example:
The number of visitors to the UK is the sum of the number of visi-
tors from North America, the number from Western Europe and the
number from other countries
Total unemployment is the sum of male and female unemployment
and also the sum of unemployment by age groups
In practice, as well as in theory, component series can be combined in
various ways to form aggregate series. There are two distinct approaches
to the seasonal adjustment of aggregate series:
1.Direct Seasonal Adjustment - this involves seasonally adjusting the ag-
gregate series without reference to the component series
2.Indirect Seasonal Adjustment - this method involves seasonally ad-
justing the individual component series, and then combining the
resulting seasonally adjusted components to obtain the seasonally
adjusted aggregate
The two methods usually do not produce the same results. Direct and
indirect methods produce equivalent results only under very restrictive
assumptions, such as when no calendar or outlier adjustment is made,
the decomposition is additive and no forecasts are used. In practice, such
conditions are rarely met, and the differences in the series produced under
the two approaches can be significant depending on the series concerned.
This chapter discusses seasonal adjustment for aggregate series. Sec-
tion 6.2discusses the problem of inconsistency between the approaches
41
42 aggregate series
in more detail. Section 6.3provides a checklist of the issues that need to
be considered when choosing between the options used to perform a sea-
sonal adjustment of an aggregate series. Section 6.4discusses other topics
related to seasonal adjustment for aggregate series.
6.2 additivity of components and seasonal adjustment
The issue of consistency between the component parts and the aggregate
after seasonal adjustment is usually referred to as one of additivity, even
though the aggregate may be formed from the components by operations
other than addition. It is important to realise that there is an inherent con-
tradiction between the quality of the seasonal adjustment and the consis-
tency across series. The goal of additivity can conflict with the primary
purpose of seasonal adjustment, that of helping users to interpret the
behaviour of a time series. For example, it seems reasonable to assume
that, for each point in time, seasonally adjusted male unemployment and
seasonally adjusted female unemployment should sum to the seasonally
adjusted total unemployment. In practice, using the direct approach to
seasonal adjustment seasonally adjusting the male, female and total se-
ries separately will not normally achieve this additivity. The indirect
approach of deriving seasonally adjusted unemployment by adding the
seasonally adjusted male and female series will guarantee additivity but
will lead to an inferior seasonal adjustment of the total series.
This problem of loss of additivity with the direct seasonal adjustment is
particularly striking in situations where a seasonal feature in a time series
switches between its components. An example of this in the ONS is the car
production series, where seasonal peaks in production can be switched be-
tween cars for the home market and cars for export markets according to
market conditions and car manufacturers’ international production plans.
The differences between the direct and indirect seasonal adjustments for
these series are large and suggest that this might be happening. A di-
rect seasonal adjustment is therefore used for total car production and no
constraining procedures are introduced to reconcile total production with
production for the home market and production for export. This lays open
the possibility of each of the component series for example, increasing, but
the total series decreasing in a particular month; this is a consequence of
the non-additivity and optimising the interpretation of each individual
series.
One likely problem of inconsistency with indirect seasonal adjustment
is that the total series can be combined in many different ways for exam-
ple, in the case of labour market statistics, the unemployed, can be split
by sex, age, region, duration of unemployment, ethnic origin, educational
attainment, etc. If one were to seasonally adjust series for unemployment
42
6.3 what type of adjustment should be used 43
by age band and add them together, this would result in a different indi-
rect seasonal adjustment of total unemployment to that derived indirectly
from the sex (male and female) series and both would be different from
that obtained by directly seasonally adjusting the total. Under such cir-
cumstances additivity can only be achieved using one of following three
standard seasonal adjustment methods:
1. Indirect seasonal adjustment at the lowest level of multidimensional
disaggregation, for example, seasonally adjusting males and females
separately in each age band
2. Constraining out any non-additivity in the seasonally adjusted series
3. Restricting the method of seasonal adjustment so that it is entirely
linear and results in a completely additive series
Each of these is theoretically problematic and in some cases difficult in
practice as well. All are potentially distortionary in their effects on the sea-
sonal adjustment of one or more series in the dataset. However, examples
of applying each of these exist in official statistics: the first characterises
Eurostat’s approach to seasonal adjustment of European industrial produc-
tion, resulting in the seasonal adjustment of thousands of series; there are
many examples of the second in the ONS, including extensive constraining
of the Labour Force Survey series; and the Bank of England currently uses
the third to adjust the monetary aggregates dataset.
The analyst faces a difficult choice. The direct approach is most likely
to deliver a seasonally adjusted series that allows users to understand its
underlying behaviour. However, for presentational and analytical reasons,
users may require seasonally adjusted results that preserve the identities
that are present in the non seasonally adjusted data. In these circumstances
the analyst has to choose between three options:
1.Indirect seasonal adjustment, which may result in sub-optimal seasonal
adjustment of the total series
2.Direct seasonal adjustment, which may result in a loss of additivity
3.Direct seasonal adjustment with constraining to ensure additivity, which
may lead to a distortion of the component series1.
6.3 what type of adjustment should be used
The decision on the level at which to seasonally adjust an aggregate series
needs to be taken on a case-by-case basis. Listed below are some factors
that should be considered when making that decision.
1see Section 6.4.1
43
44 aggregate series
6.3.1Factors favouring indirect seasonal adjustment
The indirect adjustment may be preferred for one or more of the following
reasons:
1. It enables information about series to be used at the level at which it
is known, that is to say the lower levels (for example, the estimation
and application of prior adjustments for seasonal breaks for motor
car series in the Index of Services dataset)
2. It enables appropriate filtering of different types of data within a
time series dataset (for example, Trade in Services where many differ-
ent data sources, some monthly, some quarterly, some annual, need
to be treated differently)
3. It ensures consistency across different data-sets (for example, where
a component is used in two different parts of the national accounts)
4. It guarantees additivity between components and totals. Therefore,
an indirect adjustment will ensure that the seasonally adjusted com-
ponents combine to equal the seasonally adjusted aggregate
5. Disaggregated data often need to be seasonally adjusted anyway to
satisfy user needs
6. Disaggregated data are sometimes more important to users than an
aggregate (for example, unemployment is more important than the
total Labour Force or total working age population)
One concern about aggregation using indirect seasonal adjustment is
related to the quality of seasonal adjustment, in particular the possibility
of residual seasonality. One of the likely cases is that if the time series are
too volatile to identify a seasonal component, the seasonal component may
only become apparent as you move up the aggregation structure. This can
result in an identifiable seasonal effect in indirectly seasonally adjusted
time series, known as residual seasonality.
6.3.2Factors favouring direct seasonal adjustment
Indirect seasonal adjustment does not necessarily result in a good quality
seasonal adjustment at the aggregate level, possible reasons for this might
be:
1. Adjustments or other processes occurring between seasonal adjust-
ment and production of the final headline aggregate might re-introduce
seasonality
44
6.3 what type of adjustment should be used 45
2. Component time series are not independent of each other and their
multivariate properties generate different seasonal dynamics at an
aggregate level, the essential problem is that non- seasonal compo-
nent series can combine to form a highly seasonal aggregate
3. Similar to the previous point, is the case where a dataset is all part
of the same sample survey. The further the series is disaggregated,
the greater the contribution of sampling variability to movements in
the series. In this case, seasonality is harder to estimate, with greater
potential for revisions
4. The more series there are to seasonally adjust, the more time-consuming
the monitoring and reanalysing becomes. In extreme cases this be-
comes completely unmanageable and no attempt can be made to do
anything other than run the adjustments on default settings
5. A potential consequence of these revisions is that seasonal adjust-
ment at a disaggregated level results in much higher I/S and I/C
ratios and therefore longer moving averages are used than would
be the case at an aggregate level. The result is that the seasonal ad-
justment is more sluggish than it should be. Seasonal adjustment is
performed to help users interpret short-term movements in the time
series ONS presents and indirect adjustment might build in a much
slower response to changes than is necessary, resulting in a more
volatile seasonally adjusted series and potentially lagging users’ abil-
ity to perceive signals inherent in the data.
6.3.3Direct vs indirect methods
Whether it is more appropriate to use direct or indirect seasonal adjust-
ment is still an open question. Neither theoretical nor empirical evidence
uniformly favours one approach over the other.
However, as ESS guidance (Mazzi et al., 2015) states, the following should
be taken into serious consideration before we choose between the direct
and the indirect seasonal adjustment:
Descriptive statistics on the quality of the indirect and direct season-
ally adjusted estimates, for example, the smoothness of the compo-
nent time series, residual seasonality tests on the indirect seasonally
adjusted estimates, and measures of revision
Characteristics of the seasonal pattern in the component time series
User demand for consistent and coherent outputs, especially where
they are additively related
45
46 aggregate series
The level of aggregation.
6.4 other related topics
6.4.1Constraining to preserve additivity
For aggregate series where it is deemed essential to use direct seasonal
adjustment and where users demand that additivity be preserved, it is
necessary to constrain the seasonally adjusted component series so that
they are consistent with the seasonally adjusted total series. One method
of ensuring that the difference between the direct and indirect seasonal
adjustment is small is to use the same model and consistent prior adjust-
ments when seasonally adjusting the total series and the component parts.
The chosen model, the one most appropriate for the total series will not
necessarily be the most appropriate model for component series so the
seasonal adjustment of the component series may be sub-optimal. Even if
this approach is used, the total may still not equal the sum of the compo-
nents. In these circumstances the difference (total sum of components)
needs to be distributed across the component series. There are many ways
of doing this including:
1. All of the difference is attributed to the largest series or to the least
significant series
2. The difference allocated to all series, in proportion to the size of each
series
3. The difference allocated to all series, in proportion to the size of the
irregular components of each series
4. Multivariate regression-based benchmarking
Constraining would need to be applied outside of X-13ARIMA-SEATS.
6.4.2Other considerations
In considering whether or not to undertake a composite analysis of an ag-
gregate series, as well as considering the points discussed in Section 6.3as
they relate to the particular series or data set concerned, a couple of other
issues may be important, particularly as each case will be different. Size
of the data set and the time available may determine what is feasible in
terms of seasonal adjustment. Does the indirect adjustment have residual
seasonality? If so, then a simple solution could be direct adjustment? The
46
6.4 other related topics 47
composite adjustment may also help to identify problems in component se-
ries. Are there any outliers in the aggregate, and/or the component series
that have been identified, and replaced that could be adversely affecting
the indirect seasonal adjustment of the aggregate series, or are there out-
liers that have been identified in the direct adjustment that have not been
identified in the adjustments of component series?
6.4.3Using X-13ARIMA-SEATS to choose the seasonal adjustment
If it is unclear which type of adjustment is needed, and the decision is
to be based on the quality of the seasonal adjustment, the X-13ARIMA-
SEATS program can produce diagnostics to aid in the decision between
the direct and indirect methods. In order to compare direct and indirect
adjustments in the X-13ARIMA-SEATS program, the composite spec can
be used to produce diagnostics to evaluate both methods. There is an
example and more information about the composite spec in Chapter 20.
47
7
REVISIONS AND UPDATES
7.1 introduction
When a new data point for the original estimates becomes available, more
information is available concerning the seasonal pattern and the under-
lying trend of the time series. This additional information may lead to a
change in published seasonally adjusted and trend estimates. This change
in seasonally adjusted and trend estimates is known as the revision. This
chapter explains how seasonal adjustments can be updated, and the ratio-
nale for each method. The second part looks at issues that may influence
revisions policies.
7.2 types of updating
The following methods are widely used for updating the time series out-
puts from a seasonal adjustment:
Annual updating involves an annual review and assessment of each
directly seasonally adjusted time series. The seasonal adjustment set-
tings and prior corrections are analysed and improved where possi-
ble. X-13ARIMA-SEATS diagnostics, such as the M and Q statistics,
Sliding Spans, Revisions history and diagnostics for the regARIMA
model are used to assess the suitability of the seasonal adjustment pa-
rameters. TSAB is responsible for reviewing the seasonal adjustment
parameters for all ONS directly seasonally adjusted time series
Current updating involves running X-13ARIMA-SEATS every month
or quarter with the latest available time series data to derive the latest
seasonally adjusted estimates. When each of these seasonal adjust-
ment runs is performed, the seasonal adjustment options used are
not the defaults, but those determined during the most recent an-
nual update. The lengths of the moving averages; prior adjustments
for Easter effects and trading days; and the type of ARIMA model
used, should all be specified in the specification file. This type of up-
dating is used across the ONS to obtain the latest seasonally adjusted
estimates
Forward Factors involves using forecasted seasonal factors (Table
D10a of the X-13ARIMA-SEATS output) derived at the time of the
49
50 revisions and updates
annual update. This results in revisions to the seasonally adjusted
estimates being applied only once a year, when the new forward
factors are estimated. This option may be adopted where there are
system constraints
Within ONS annual updates are carried out by TSAB, while individual
branches responsible for the original data carry out current updating.
7.3 which seasonal adjustment parameters
should be fixed or re-estimated
In general, everything should be fixed when a seasonal adjustment review
is complete. There should be no automatic procedures in order to prevent
changes to the seasonal adjustment specifications and therefore reduce the
size of revisions in subsequent publications. Outlined below is a general
guide to which seasonal adjustment parameters should be fixed and which
should be re-estimated each time a current update is run:
The ARIMA model should be fixed in the X-13ARIMA-SEATS arima
specification
The appropriate transformation should be fixed in the transforma-
tion specification
Easter and trading day regressors should be included in the regres-
sion specification as variables, and not left to the automatic selection
using the AICC test
The dates for additive outliers and level shifts defined by the au-
tomatic outlier detection should be converted into fixed regressors
in the regression specification. In this way the effect of the regres-
sors will be fixed in the model whilst the parameter adjustment
is re-estimated every month/quarter. An alternative approach for
known impacts is to also fix the parameter estimate so that it is not
re-estimated at each time period
User-defined seasonal regressors should be used in the regression
specification to correct for a seasonal break. These regressors should
be converted into permanent priors only if the time series have mul-
tiple seasonal breaks1
The trend and seasonal moving averages should be fixed in the x11
specification for smaller revisions.
1for more information see Chapter 14
50
7.4 revisions 51
7.4 revisions
Each new data point that becomes available will impact on the estimates
of the seasonal and trend component for previous periods. Each seasonal
adjustment update will potentially cause revisions along the length of the
seasonally adjusted estimates. Figure 7.1shows the impact on the season-
ally adjusted series of adding additional data points.
Figure 7.1: Revisions of seasonally adjusted estimates over time
Major revisions are typically applied after the addition of new data to
the immediately preceding period and to the corresponding period one
year prior. For example, when new original data became available in De-
cember 2006, the seasonally adjusted and trend estimates were revised
from November 2006 backwards in time, with potentially larger revisions
for November 2006 and December 2005. However, if the annual totals are
constrained2, revisions cannot be made without revising the whole year,
and so the revision would not generally be made.
Often, the nature of the seasonal adjustment will imply that revisions
should occur at other time lags. For example, time lags of two and three
periods might also be revised, if these show large changes when a new
data point is added. In general, the seasonal adjustment must be revised
back to any periods where the raw data has to be revised. If revisions to
raw data are large, then the seasonal adjustment of neighbouring points
may also need to be revised. A graph of the adjustment, before and after
the revisions, should be checked to see if this is generally the case.
2see Chapter 5
51
52 revisions and updates
Reference Period April-2019 July-2019 Oct-2019 Jan-2020
2019 Q1 100 102 101 101
2019 Q2 104 105 105
2019 Q3 102 101
2019 Q4 110
Table 7.1: Published time series at different publication dates
If a problem with seasonal adjustment is found between annual updates,
this should be corrected as soon as possible. This will mean that seasonally
adjusted and trend estimates may be revised. If a seasonally adjusted se-
ries is particularly smooth, then in the annual update it may be necessary
to revise merely the previous two years, or even the previous year only.
Conversely, if the adjustment is dominated by the irregular component, it
may be necessary to revise up to four years prior.
A revision policy should be determined taking user requirements and
revisions of raw data into account. The revisions history diagnostic3and
the revision triangle method are useful indicators for determining which
revision policy is best from a seasonal adjustment perspective.
Table 7.1shows an example of a real time database where the columns
denote the date of publication of a time series and the rows denote the
time period that the observation refers to. Reading across a row shows
how a particular time point has changed at different publication dates.
The latest estimate of all time points is shown in the final column which
was published in January 2020.
A revisions triangle can be calculated from the real time data base sim-
ply by calculating how a time point is revised between consecutive publi-
cation dates. Table 7.2is a revisions triangle calculated from the real time
database in Table 7.1and shows that between the time series published
in October 2019 and January 2020, there were no revisions to 2019 Q1or
2019 Q2but the estimate of 2019 Q3was revised down by 1in January
2020. Reading down a diagonal shows how a time series has revised at a
particular lag.
Reference Period April-2019 July-2019 Oct-2019 Jan-2020
2019 Q1-2-1 0
2019 Q2-1 0
2019 Q3- -1
2019 Q4-
Table 7.2:QQ revision to published time series
3see Chapter 19
52
7.4 revisions 53
The decision as to when to revise, and how many data to revise, is im-
portant. Revisions policies can have a major impact on user confidence
and the quality of published data. Therefore, a revisions policy that takes
into account all the factors detailed above is an important element for pro-
ducing high quality seasonally adjusted series. In general, revisions and
revisions policies for seasonally adjusted and trend estimates will depend
on the nature of the time series and the area responsible for publishing
the data.
For more information see also the European Statistical System (ESS)4
guidelines on revision policy for Principal European Economic indicators
(PEEIs) from the European Commission.
4Mazzi et al. (2015)
53
8
THE REG-ARIMA MODEL
8.1 introduction
The regARIMA part of the X-13ARIMA-SEATS program precedes seasonal
adjustment. It modifies the time series so that the seasonal adjustment
process will produce higher quality estimates. The time series is modified
by forecasts, removal of effects caused by the arrangement of the calendar,
and by temporary removal of outliers and similar effects.
Series extension - the series is extended forwards by adding forecasts,
and backwards by adding backcasts. This produces a longer span of
data to input in the seasonal adjustment process leading to better
quality seasonal adjustment, particularly at the ends of the series.
Consequently revisions are lower when the time series is augmented
with new observations
Calendar effects effects associated with the arrangement of the cal-
endar are removed from the series. This improves the estimation of
seasonal effects and makes the series easier to interpret
Outliers, breaks and other changes the series can be adjusted for un-
usual and disruptive features such as a sudden and sustained drop
in the level of a series. Removing such features makes the seasonal
adjustment more robust by preventing them from distorting the sub-
sequent estimation of seasonality. However, these features typically
represent the real world behaviour of whatever the time series is
measuring so the features are returned to the series after seasonal
adjustment is complete.
8.2 overview of regarima
regARIMA is the name of the statistical modelling facility in X-13ARIMA-
SEATS. It enables two types of models to be fitted to a time series: an
ARIMA model and a regression model.
Autoregressive Integrated Moving Average (ARIMA) models, are models
for time series that take account of trend and seasonality in the data. The
program X-13ARIMA-SEATS©will choose the most appropriate form of
ARIMA model for an individual series using the model fitting criteria built
55
56 the reg-arima model
into the program, or the user can specify the form of ARIMA model to be
applied.
The regression part of regARIMA refers to the options that enhance the
ARIMA model with variables that can represent, for example, outliers or
calendar effects. In technical terms, the regARIMA is as a linear regression
where the error terms follow an ARIMA process rather than a white noise
process:
yt=x
tβ+zt(1)
here xtis a vector of regression variables, βa vector of regression pa-
rameters, and the error term ztfollows an ARIMA process.
Once the model has been specified it can be used to produce forecasts
and backcasts. The variables of the regression part of the model give esti-
mates of calendar and other effects that are removed before the series goes
through the seasonal adjustment process.
This chapter shows how the regARIMA model can be set up. There are
three topics:
1. Transformation of the series
2. Specification of the ARIMA part
3. Specification of the regression part
Although it is convenient to separate headings 2and 3in this way, they
are not really separate sequential processes. If we do not include appro-
priate regression variables (particularly for effects like outliers and level
shifts), it may be impossible to produce a satisfactory ARIMA model.
There is often an iterative cycle of adding new regression variables and
re-specifying the ARIMA model until a satisfactory set of diagnostics is
obtained, as discussed in more detail in Section 8.6.
8.3 transformation of the series
The first step in fitting a regARIMA model is to transform the series. X-
13ARIMA-SEATS allows the following transformation: none, log, logistic,
square root, inverse and Box-Cox. Most commonly the regARIMA model
is fitted either to the original series or to the log transformed series, the
choice depends on whether the series is additive or multiplicative. When
the series is additive, the regARIMA model is fitted directly to the original
series. When the series is multiplicative, the model is fitted to the log
transformed series. The effect of a log transformation is to change the
scale of a series and to turn multiplicative effects into additive ones. This
is done purely for the purpose of fitting the model. Guidance on choosing
whether a multiplicative or additive decomposition is most appropriate
for a series can be found in Chapter 12.
56
8.4 specification of the arima part of the model 57
8.4 specification of the arima part of the model
The purpose of ARIMA modelling is to identify systematic structural fea-
tures in the history of the series. We assume that these features will con-
tinue to be present in the future and will use them to forecast future val-
ues. The ARIMA method provides a wide range of possible models, which
have been found very effective in modelling typical socio-economic series
showing trends, seasonality and business cycle effects.
This section gives a brief and largely non-technical explanation of ARIMA
modelling. TSAB should be consulted if more technical detail is needed.
We start by discussing the model for non-seasonal series, because this is
simpler. This model is extended in a straightforward way to apply it to
seasonal series. For non-seasonal series the form of the ARIMA model
is that the value at a given time point is modelled as some combination
of previous values plus a random quantity called the innovation. Innova-
tions are modelled as independent samples from a normal distribution
with zero mean and constant variance. Within this general framework we
distinguish the three types of effect included in the ARIMA model.
Autoregressive (AR): the value depends on some linear combination of
previous series values
Moving average: the value depends on some linear combination of
previous innovations
Integrated: the autoregressive and moving average effects apply to
differences of the values, rather than the values themselves
In each of these categories, the number of lags involved is referred to
as the order of the effect. The order of a model is abbreviated in the form
(p,d,q), where p is the order of the autoregressive component, d is the
order of differencing and q is the order of moving average. the example
models below are represented as (100), (011) and (202) respectively. In
what follows, xtis the series value at time tthe innovation is εt.ϕiare co-
efficients to be estimated on the autoregressive lags and θiare coefficients
to be estimated on the moving average lags.
1. A first order autoregressive model (100):
xtϕ1xt1=εt
2. A first order integrated moving average model (011):
xtxt1=εtθ1εt1
3. A second order autoregressive and second order moving average
model (202):
xtϕ1xt1ϕ2xt2=εtθ1εt1θ2εt2
57
58 the reg-arima model
Note that all terms involving xhave been moved to the left of the equals
sign and all terms involving εto the right; this is the conventional arrange-
ment.
If there is a seasonal component then there is an effect that repeats at
annual intervals. This is modelled in the same way as a non-seasonal ef-
fect, except that the dependence is on values occurring one, two,... years
ago rather than one, two,... periods ago. For example, for a monthly series,
a seasonal autoregressive component will involve a relationship between
xtand xt12,xt24,... and similarly for seasonal moving averages or differ-
ences.
A seasonal series will usually have a non-seasonal component, defined
by (p d q) as above, and a seasonal component with separate parame-
ters and written as (P D Q). The combination of these two components
is indicated by putting the two brackets together, with a subscript on the
seasonal indicating the seasonal period. For example, the seasonal model
called the airline model (so called because Box and Jenkins used it to
model monthly numbers of airline passengers), is written (011)(011)12
though the subscript is usually omitted because its value is clear from
the context.
Sampling variation or irregularity in the observed series means it is
often possible to find different ARIMA models that will fit satisfactorily.
We recommend choosing the simplest model which will give a satisfactory
fit, where simplest means having the smallest number of parameters. This
is known as parsimonious parameterisation, or parsimony for short. The
process of searching for a model often involves adding parameters to avoid
specification errors and then de-selecting previously chosen parameters
that can be removed in the interests of parsimony.
The principal tool in testing for a satisfactory fit is the autocorrelation
of the residuals, which are the estimates of the innovations. The innova-
tions should be independent, so any significant serial correlations in the
residuals could be an indication of a deficiency in the model. There are
guidelines to indicate how a model should be changed to remove par-
ticular patterns of serial correlation, though these will not normally be
needed, because the automatic choices of X-13ARIMA-SEATS are almost
always adequate.
There are two approaches to automatic model selection in X-13 ARIMA-
SEATS.
1. Search through a predetermined list of candidate models to find a
satisfactory fit. The candidates are usually arranged in order of in-
creasing complexity
2. Starting with a simple model, allow the program to add terms suc-
cessively up to predetermined limits on the number of terms, until
58
8.4 specification of the arima part of the model 59
the fit meets some criterion of goodness of fit. The terms added at
each stage being determined by the deficiencies in the previous fit
The first approach is based on work by Statistics Canada. The second
approach is based on the TRAMO method of Gomez and Maravall at the
Bank of Spain. The user of the latest X-13ARIMA-SEATS has the choice of
either method, or may impose a choice of model if the automatic choice
is not satisfactory. The first method is provided by the pickmdl spec, the
second by the automdl spec. The two approaches are outlined in the fol-
lowing sections, Section 8.4.1and Section 8.4.2
8.4.1Automatic model selection with the automdl spec
The automdl spec proceeds by successively improving the first simple
model. Terms are added or modified when the specification tests show
that the current model is inadequate and the modified model is better;
terms are removed when they are no longer significant. This continues
automatically within user-specified limits on the complexity of permitted
models.
The limits on complexity are specified in terms of the maximum values
of the parameters p, d, q, P, D and Q. There are default values for these
maxima which are built into the program, but these may be specified by
the user if necessary. The maxima for d and D are specified by the maxdiff
argument, the maxima for p, q, P and Q by the maxorder argument. The
default values are d2,D1,(p,q)2,(P,Q)1, which may be
represented in terms of the arguments as maxdiff=(2 1),maxorder=(2 1).
For normal purposes these default values will be adequate; they should
not be overridden unless the program fails to produce a satisfactory model
using them.
If no satisfactory model is produced with the default values, alternatives
may be tried. The only alternative with maxdiff is (2 2), which should not
be tried until all other possibilities are exhausted.
For maxorder, Table 8.1shows alternative values which empirical re-
search has shown may sometimes be preferable. Any model produced
using these limits should be carefully scrutinised to see that all its diag-
nostics are satisfactory.
Sometimes the program will fail to select an ARIMA model. There are
other parameters that can be varied to improve the outcome in difficult
cases, but their use requires care and experience. It is recommended that
TSAB be consulted if problems arise.
59
60 the reg-arima model
Series length Monthly Series Quartely Series
<6years (2 1) (2 1)
6-10 years (3 1) (3 1)
10-15 years (4 1) (3 1)
>15 years (4 2) (4 2)
Table 8.1: Alternative values for the maxorder argument
8.4.2Automatic model selection with the pickmdl spec
When the pickmdl spec is used X-13ARIMA-SEATS selects a model from a
limited list of models, subject to certain model selection tests. The program
uses as default a list based on the original research by Statistics Canada,
which consists of five models:
(011)(011)
(012)(011)
(210)(011)
(022)(011)
(212)(011)
If necessary, the user may add to this list or provide a completely differ-
ent list; this requires careful testing before an alternative can be considered
safe, and it is recommended that TSAB be consulted before undertaking
any change.
The selection tests are as follows:
1. A test that the residuals are not serially correlated
2. Testing the MA part of the model for evidence of over differencing
3. Within-sample forecast error. For this test to pass the absolute av-
erage percentage error of within-sample forecasts in the last three
years should be less than 15%
The first two tests are aimed at misspecification, which would give false
forecasts even if the fit of the data is satisfactory. The third test is a quan-
titative measure of within-sample forecast accuracy in the last three years
of the series. The models are tested sequentially in the order shown above,
which is clearly that of increasing complexity. If no model passes all tests
then the first and simplest one, the (0 1 1)(0 1 1) model, is used. How-
ever, it is used only for the purpose of estimating the regression effects;
no forecasts are generated if no model passes the tests. The default op-
eration of the method is that the first model tested which passes all the
60
8.4 specification of the arima part of the model 61
tests is accepted. This can be specified explicitly by putting method=first.
The alternative is method=best, which means that all models are tested
and the acceptable model with the lowest forecast error is accepted. It is
recommended to use the default.
If the program also performs automatic identification of outliers using
the outlier spec, the default is to identify them simultaneously with the
estimation of the first ARIMA model that is tested and take them as given
for the estimation of the other models. This is the recommended approach.
Other optional arguments are available, which are detailed in section
7.12 of the X-13ARIMA-SEATS manual (USCB 2017). We recommend leav-
ing them at their default values.
8.4.3Fixing the ARIMA model
X-13ARIMA-SEATS also provides the option of imposing directly the lag
structure of the ARIMA, and even the values of some or all of its parame-
ters. This is done by using the arima spec. The model that is specified in
this way can be used in any action performed on the series, for example
outlier detection, regression, forecasting. This is likely to be useful in two
circumstances.
1. When the user has specific knowledge about the real world processes
underlying the production of the data
2. When we want to ensure that the model identified by the automatic
process is not updated during concurrent adjustment
These are discussed in more detail in the following paragraphs. When the
user has specific knowledge about the real world processes underlying
the production of the data, and this knowledge will not be captured by
the automatic modelling procedure. For example, in the case of monthly
financial data, it may be known that there is a quarterly cycle because
of the way institutions operate as well as the annual cycle. Similarly, the
quarterly cycle in the operation of the Labour Force Survey might impose
an extra structure on the LFS unemployment series.
Generally concurrent adjustment uses all available data to adjust the cur-
rent value, but experience shows that frequent switching between models
caused by updating can introduce undesirable instability in the season-
ally adjusted output. It is therefore general practice to keep the form of
the chosen model fixed between annual re-analyses, and re-estimate the
parameter values each period.
The appropriate form of specification for the standard arima spec is:
arima{model=(p d q)(P D Q)} where p, d, q are the orders of the regular
part of the model and P, D, Q are the orders of the seasonal part. The
61
62 the reg-arima model
seasonal part may optionally be followed by the seasonal period, either 4
or 12, and if necessary the model may be extended with other brackets
followed by an appropriate period. (In common with other X-13ARIMA-
SEATS specs, the commas in the inner brackets may be omitted provided
the figures are separated by spaces.) The other possible arguments of
arima are concerned with pre-specifying parameter values, and should
not be used. Note that if arima is used in a spec file there must not also
be an automatic modelling spec: automdl or pickmdl.
8.4.4Identifying a model manually
In most cases the automatic modelling options will produce satisfactory
models. It should seldom be necessary for users of X-13ARIMA-SEATS
to undertake manual model identification from scratch. The program can
produce the necessary autocorrelation outputs, and there are textbooks
which describe the procedure, but it requires considerable experience to
produce reliable results.
The one situation in which manual identification may be justified is
when automatic identification has produced a model that, while satisfying
the tests, still has some unsatisfactory features. For example, although the
combined test on the serial correlations of the residuals may be passed,
there may still be some individual significant correlations at fairly low lags.
It may then be justifiable to try manual refinement of the automatic model.
In the example case, it could be worthwhile adding an extra coefficient at
the appropriate lag to the AR or MA component; if the extra coefficient
is significant and the significant serial correlation has been removed, the
extra term may be justified.
The process of manual refinement needs a degree of skill and care, and
advice should be sought if in any doubt. The program provides a number
of diagnostics which are helpful in this process, for example the model
identification statistics AICC and Bayesian Information Criterion (BIC). De-
tails of the use of these may be found in X-13ARIMA-SEATS (2017).
8.5 specify the regression part
In addition to the relations within a time series that are captured by the
ARIMA model, the series may also be affected by external deterministic
factors, such as outliers, trend or seasonal breaks, calendar effects. In this
case the only satisfactory approach is first to subtract these deterministic
effects, and then fit an ARIMA model to the linearised series. However, the
exact size of the deterministic effects is usually unknown and needs to be
estimated, which cannot be done until the ARIMA structure is determined.
The most effective way of doing this is by use of a regARIMA model,
62
8.5 specify the regression part 63
which encompasses both the deterministic effects and the ARIMA struc-
ture and estimates them simultaneously. The previous section described
how to specify the ARIMA part of the model.
This section describes how the regression part should be specified. Spec-
ifying the regression part of the model essentially means deciding which
variables to include. The recommended option is that a regression vari-
able is included only if theory or knowledge of the series indicates that a
regression effect is possible, and this is proved with statistical tests. What
is meant by theory or knowledge of the series is whether or not the user
expects a particular variable to be important given any prior knowledge
for the same or a similar series. This theoretical question is answered in
the relevant chapters. For example, the trading day chapter describes in
which cases a trading day effect is possible.
This chapter concentrates on the statistical tests that should be used to
decide whether a particular effect is indeed significant or not. The rest of
this section is organised as follows: Section 8.5.1considers the question of
types of regression variable. Section 8.5.2describes the built-in regression
variables that are available to users and Section 8.5.3how to specify other
variables which are not available in the program. Section 8.5.4describes
how to include variables optionally, basing the decision on statistical tests
of significance in X-13ARIMA-SEATS.
8.5.1Types of regression variables
X-13ARIMA-SEATS has a wide range of program-specified variables, which
will cover many of the common situations; those most often used are de-
scribed below. Users can also include variables of their own to capture ef-
fects which are not provided by the built-in types. Values for user-defined
variables must be input into the program in the same format as series
values; this includes values for any forecast periods as well as those cor-
responding to actual observations. All the built-in variables are assigned
to a variable type, and users must specify an appropriate type for any
user-defined variables. The concept of variable type is important in two
contexts.
The program output in some areas gives a significance test for the
joint effect of all variables of a given type, rather than each variable
separately; this is explained in more detail in the discussion of esti-
mation and inference (Section 8.6)
The type of a variable determines whether its effect is combined with
the seasonal effect in adjusting the series
The latter point needs further explanation. All the regression variables
are removed from the original series in order to estimate the seasonal
63
64 the reg-arima model
component, but for many variables this removal is not permanent, since
we wish to regard their effects as part of the information about real world
effects that the adjusted series conveys. For example, we could identify
a trading day effect and a level shift in the same series. Both can distort
seasonal patterns, and both are removed before estimating the seasonal.
However, the trading day effect is part of the variation which we wish to
remove, since we regard it as a calendar effect, so it is not replaced when
obtaining the seasonally adjusted series. The level shift represents some
real world effect which we wish to be able to observe in the seasonally
adjusted series, and perhaps try to explain. Its estimated effect is therefore
replaced in the final adjusted series.
As a general rule, all calendar-related variables, for example trading day,
holiday, length of month, leap year, are removed from the final seasonally
adjusted series, while seasonal and outlier variables are not. User-defined
variables that do not fit with any of the pre-specified types can be assigned
the non-specific type user. They are not removed from the final series
unless final=user is specified in the x11 spec.
It should be noted that some effects which might be dealt with through
regression variables could in some circumstances be handled instead by
prior adjustment. For example, if there is a series break of known size, a
multiplicative prior adjustment would remove it. The effect of this on the
adjustment process is the same as that of a level shift regression variable
of the same size. The prior adjustment is removed from the series before
seasonal estimation, and is restored in the final adjusted series.
8.5.2Program-specified regression variables
The program-specified variables include the following.
1. A constant term. This variable will rarely need to be used, as its pres-
ence implies a deterministic trend of order equal to the total number
of differences, which will in most cases be difficult to justify. A con-
stant term might be used though if the regular part of the ARIMA
model includes a zero difference term. Another case is when the
ARIMA model was selected with the automdl method, and it was
found that a constant is significant. On the other hand, it is not ad-
visable to use a constant together with the pickmdl model selection
routine
2.Deterministic seasonality. This can be in the form of either seasonal
constants or of trigonometric regression variables, but one cannot
include both. The advantage of trigonometric variables is that their
use requires fewer parameters. Although deterministic or almost de-
terministic seasonality will be the case for many series, the use of
64
8.5 specify the regression part 65
seasonal constants is not particularly recommended. This is because
deterministic seasonality is equivalent to a seasonal MA coefficient
of 1, in a seasonal (011) ARIMA model. Although in this case it is
more efficient to reduce the order of seasonal differencing and cap-
ture the seasonal fluctuations with seasonal constants and a stable
seasonal Autoregressive Moving Average (ARMA), for the purpose of
seasonal adjustment this is not likely to add much value; in practice
a seasonal (0 1 1) ARIMA with a MA coefficient equal to, for exam-
ple 0.95 will be indistinguishable from deterministic seasonality. In
addition, if one has to reduce a seasonal overdifferencing to a stable
seasonal ARMA model with seasonal means as just described this
has to be done manually, as X-13ARIMA-SEATS does not do it au-
tomatically, as it does for non-seasonal overdifferencing. For these
reasons the use of seasonal constants is discouraged. Trigonometric
regression variables on the other hand can be used occasionally, for
example in short monthly series where the alternatives of using sea-
sonal dummies or seasonal differencing cost 12 observations.
It should be noted that there is a difference between constants and de-
terministic seasonals and all other regression variables, in that these
variables are not adjusted out of the original series before estimating
the seasonal component through the X-11 algorithm; these variables
are there simply to make it possible to forecast the series
3.Trading day variables. There is a wide range of alternative variables,
which correspond to the various different ways in which the number
of occurrences of the days of the week within the month can affect
economic activity. Details on the trading day effect, the alternative
variables, and when it is appropriate to use each of them are given
in Chapter 9. What should be emphasised though is that only one
trading day variable can be included in a regression
4.Easter effect. There is a range of built-in variables that correspond to
the different ways in which Easter affects economic activity, detailed
in Chapter 10. Other holiday variables, aiming in accounting for the
effects on economic activity from other holidays, can be used as well
5. If the users know that an important event has happened that is likely
to affect the quality of the seasonal adjustment they should include
a regression variable that takes into account this effect. Depending
on the nature of the event and the duration of its effects this variable
may be an additive outlier, level shift, temporary change, or ramp.
Automatically detected outliers can also be included in the regres-
sion, if so requested by the outlier spec. In contrast to the above in-
65
66 the reg-arima model
tervention variables, these outliers are unknown and can be detected
only from the data
6. Finally, there may be cases where a variable does not affect a series
in the same way throughout the sampling period. This can happen
in cases of policy changes or other important events. In such cases
change of regime variables can be used to account for the change. In
particular, change of regime variables can be used for either trading
day regressors or deterministic seasonality. The case for determinis-
tic seasonality with change of regime is when a seasonal break is
suspected1.
8.5.3User-specified variables
The variables that are built into X-13ARIMA-SEATS will in most cases
cover the user’s needs, but there will be some special cases for which
the program has not provided. In such cases the users can define and
use their own regression variables. User-defined variables are necessary
in situations such as the following.
1.Non-calendar data, that is data collected on a different basis from that
dictated by the monthly calendar. If for instance monthly flow data
are collected on the last Sunday of every month, then one has months
with 4or 5complete weeks, rather than months with 4or 5Wednes-
days, for example, as assumed by the standard trading day variable.
A specially designed variable should be used instead of a trading
day one
2. If the series is affected by a program-specified variable but with a
delay then one needs to input the lagged program-specified variable
as a user-specified one, because X-13ARIMA-SEATS does not have
an option to do it automatically
3. A change of regime that cannot be captured by the built-in change
of regime variables. To specify user-defined variables, the variables
must be named and their names listed in the user argument of the
regression spec. The types must be listed in the usertype argument
in matching order to the names in the user argument, unless all user
variables are to have the same type. The values of the variables for all
periods, including forecast ones, must be listed in a table. The table
may be embedded as data in the spec file, but is better stored in a
text file which is referenced by a file argument.
1for more details on seasonal breaks see Chapter 14
66
8.6 estimation and inference with regarima 67
8.5.4Optional variables and statistical tests
The procedure implied above is that variables may be included specula-
tively in the model, tested for significance and then removed if not signifi-
cant. This then requires another run to re-estimate the model without the
variables. There is an alternative to this, which is to specify that certain
variables are to be tested to see if their inclusion improves the model fit,
included if there is improvement and excluded if not. The only variables
which may be treated in this way are trading day and Easter and variables
of type user.
The program will estimate the model with and without the optional
variables and select the version which gives the smaller value of AICC.
If several variables are specified for this treatment, they are tested in up
to three groups: first any trading day variables, next any Easter variables,
finally any user variables. All of the variables in a group are tested and
included or excluded together. The variables to be tested in this way are
specified in the aictest argument; they must normally also be listed in ei-
ther the variables or user arguments, depending on whether or not they
are built-in variables. Exceptionally, if Easter is included in the aictest ar-
gument then it may be omitted from the variables argument. In this case,
the program automatically considers different lengths w = 1,8,15 for the
Easter[w] effect, and compares the best of these with the option of no
Easter effect.
Another type of optional variable controlled by statistical tests is an
automatic outlier variable. If the spec file includes an outlier spec, the
program will search each possible time point to see if an outlier included
at that point would be significant. All outliers identified a as result of this
proves are added to the model2.
8.6 estimation and inference with regarima
Three issues are relevant to the estimation of a regARIMA model: the or-
der of differencing, regression effects and the ARMA specification of the
stationary series. This order corresponds to their order of importance in a
seasonal adjustment. If the series is differenced fewer times than required,
the regression effects and their statistical significance may not be reliable.
Mis-specifying the ARMA of the stationary series, on the other hand, is
not as harmful for the purpose of seasonal adjustment as omitting a regres-
sion variable. Once the model is estimated one needs to check whether it
is properly fitted or not. In most cases this can be taken for granted for the
ARIMA part of the model, as it has most probably been automatically se-
2for more details of types of outlier and options on inclusion see Chapter 11
67
68 the reg-arima model
lected. With regard to the regression part of the model though, one needs
to test whether the regression variables are significant or not and whether
additional variables should be included. The usual t-statistic, chi-squared
and Akaike Information Criterion (AIC) tests are used.
8.6.1Automatically run tests
A lot of tests are run by default and do not need to be asked for in the spec.
In particular, the program produces t-statistics for all regression coeffi-
cients; it also provides chi-squared values for groups of variables wherever
they are more meaningful as a group. For example, it is more meaningful
to test whether the six trading day variables together show a significant
effect, rather than testing if, say, the number of Tuesdays in a month has
any significant effect.
When a variable is tested individually, it should be considered statis-
tically significant if its t-statistic is beyond the critical value for the sig-
nificance level required. As a rule of thumb, a t-statistic greater than 2
in absolute value is significant at the 5% level. If, on the other hand, a
group of variables such as trading day regressors are jointly tested, then
the chi-squared test statistic is appropriate. For this statistic the program
automatically gives the p-value, and any value less than 0.05 is usually
considered significant.
In some cases, it is not necessary to carry out an explicit test, since the
terms have been included automatically because they are significant. This
applies to level shifts and other outlier terms selected by the outlier spec.
In other cases, the appropriate type of test should be carried out on the
individual terms or groups of terms, and the terms retained or deleted
as appropriate. For example, it is good practice to verify that the p-value
or the t-value associated with trading day or Easter terms selected by the
aictest are statistically significant.
8.6.2Non-automatic tests
Although in most cases the automatic tests will be sufficient, one might
often wish to test a hypothesis that cannot be tested automatically. This
can often be done by some manipulation or combination of the outputs.
There are several such examples.
1. Alternative models may require separate runs of X-13ARIMA-SEATS,
because it is not possible to specify one as a specialised version of an-
other (these are referred to as non-nested models). In such cases the
model selection statistics AIC, AICC, BIC may be used. The model
with the smallest value of the chosen criterion is preferred. There
68
8.6 estimation and inference with regarima 69
are limitations on the use of these statistics. In particular, the de-
pendent variable in the regression must be identical in all the cases
being compared, meaning that the series span, order of differencing,
transformation and the outliers included in the model must be the
same
2. The autoregressive and moving average parameters do not have t-
statistics attached. They do have a standard error attached to their
values, however, and the t value is the ratio of the two. Normally the
automatic model selection will have ensured that only significant
terms are retained, but if a model has been manually refined such
checks are needed
3. If we wish to test whether the parameters attached to two variables
are equal, we can rearrange the model to provide a direct test. We
define a new variable which is the sum of the two variables, and
include this in the model in place of one of the two. The coefficient
of the remaining single variable now represents the difference in the
two parameters, and its significance is a test of the difference
4. If we wish to test the joint significance of a group of variables, and
we are not able to define them as a group by type for which a chi-
squared value is produced, we can carry out runs with and without
the variables concerned and compare the results. The simplest com-
parison is to use one of the model selection statistics AICC or BIC.
An alternative, which can give a numerical level of significance rather
than a yes-no result, is to compare the log likelihood values from the
same table as the model selection statistics. The difference in log like-
lihood is distributed as chi-squared with degrees of freedom equal
to the number of extra parameters
These are merely examples of the ways in which hypotheses about the
model fitting may be constructed and tested to meet particular circum-
stances. The principles exemplified here may be adapted to other situa-
tions. If difficulties arise which users cannot easily solve, in the first in-
stance TSAB should be consulted.
69
70 the reg-arima model
8.7 summary of implementation instructions
The analyst should keep parsimony in mind. Regression variables should
be included in the model only if they are significant and improve the qual-
ity of the seasonal adjustment. The analyst should implement the model
differently depending on whether the time series is being analysed for the
first time, at the regular seasonal adjustment review, or is being used in
production.
8.7.1Time series analysed for the first time
Consider whether there are special effects which might suggest that
automatic model selection is inappropriate. If not, use an automatic
model selection with an appropriate forecast horizon. Backcasts may
also be used unless the series is very long
If the pickmdl method is used, backcasts can be produced by speci-
fying mode=both
Include in the regression spec all the variables that might have an
effect on the series. For example, consider whether the process being
measured is likely to be affected by calendar effects like Easter or
days of the week; see if there are any known events in the history
of the series which might have caused breaks; see if any external
variables like weather might affect the series
Run X-13ARIMA-SEATS to generate model selection and regression
statistics
If the chosen model selection procedure does not give a satisfactory
model, consider varying the selection procedure3or manually refin-
ing the best model produced by the automatic procedure. As a last
resort use the default (011)(011) model
Check the statistical significance of the regression variables, as ex-
plained above. If the tests show that the set of variables that should
be included is different from the one that was actually included,
amend accordingly and run X-13ARIMA-SEATS again, repeating the
process of ARIMA model selection
The simultaneous estimation of the regression and ARIMA parame-
ters may, rarely, lead to convergence problems. If the maximum num-
ber of iterations is run without convergence having been achieved,
one should increase this maximum number of iterations and try
3see Section 8.4
70
8.7 summary of implementation instructions 71
again. This can be done with the maxiter argument in the estimate
spec. If the estimation has not converged, it is wrong to use the out-
put of the last iteration as the estimate. If convergence cannot be
achieved, more options are provided in the X-13ARIMA-SEATS man-
ual (USCB 2017), or consult TSAB.
8.7.2Model set up for regular seasonal adjustment review
All changes to the model should be considered before introduction
to see what effect they have on historical data. Stability may often be
more important than a marginal improvement in fit
Use the automatic model selection procedure that was used in the
previous analysis. If a different model is chosen, examine the test
statistics to see whether the new model is substantially better than
the previous one. If the difference is marginal and the statistics for
the previous model are still satisfactory, consider imposing the pre-
vious model in the interests of stability
Include in the regression spec all the variables that were found sig-
nificant in the previous run, plus any excluded but found to be on
the margin
Run X-13ARIMA-SEATS to generate model selection and regression
statistics
Check the significance of the regression variables as before. If any
which were previously included are now strongly non-significant,
with a t-value lower than 1, they can be dropped. If any regression
variables that were previously included have a t-value in between 1
and 2it is better to keep the variable in the model to avoid unaccept-
able revisions of previously published seasonally adjusted data. That
variable should be tested again at the following annual re-analysis.
8.7.3Model set up for production running
Using the arima spec, impose the ARIMA model that was selected
at the time of the last re-analysis
Use the forecast spec to specify the appropriate forecast and backcast
horizons
Use the regression variables that were selected at the time of the re-
analysis. Any effects selected for inclusion by aictest should instead
be fixed in the variables argument, and aictest should be removed
71
72 the reg-arima model
Fix neither the ARIMA nor the regression parameters
Run X-13ARIMA-SEATS.
72
9
TRADING DAY
9.1 introduction
Trading day effects are those parts of the movements in a time series that
are attributable to the arrangement of days of the week in calendar months.
For example, a month containing 5Saturdays is likely to show a higher
level of sales than a month containing 4Saturdays. As with seasonal ef-
fects, it is desirable to estimate and remove trading day effects from time
series to help interpretation.
X-13ARIMA-SEATS estimates trading day effects by adding regressors
to the regARIMA model. Section 9.2discusses the problems of the arrange-
ment of the calendar. Section 9.3describes when to adjust for trading day
effects. Section 9.4provides details of the different types of regressors
used by X-13ARIMA-SEATS to adjust for trading day effects. Section 9.5
describes the recommended procedure to adjust for trading day effects
and explains how to implement the results in a production environment.
Section 9.6gives more details of related options and topics. Finally, Sec-
tion 9.7gives guidance on dealing with non-calendar data.
9.2 the arrangement of the calendar
Trading day effects arise because the number of occurrences of each day of
the week in a month differs from year to year. An example of the arrange-
ment of the calendar problem is shown in Table 9.1, where the number of
occurrences for June is calculated across three years, 2019-2021.
These differences will cause regular effects in some series. For example,
a production series where no work takes place on Saturday or Sunday will
have two fewer working day in June 2019 than in June 2020, which will
have the same working days as June 2021. Thus, it is likely that the series
has a slightly lower value in June 2019 than in June 2020 or 2021 without
reflecting the long-term trend.
Those differences are not genuine movements of the production, but are
just because the numbers of working days in a factory are 20,22 and 22
respectively. This regular effect can be identified and removed by the use
of regressors in the regARIMA model.
Trading day effects may also reflect how data are recorded more than
when the event happened, for example sales for the weekend may be
73
74 trading day
Number of days
Year 2019 2020 2021
Monday 454
Tuesday 455
Wednesday 445
Thursday 444
Friday 444
Saturday 544
Sunday 544
Table 9.1: Day of week composition for June 2019,2020 and 2021
recorded on the following Monday. This will cause a regular effect that
should be removed from the series.
For quarterly series there is less variation in the possible arrangement
of the days of the week.
There are between 90 and 92 days per quarter with a minimum of
12 occurrences of a particular day and maximum of 14 in any one
quarter
In non-leap years, quarter 1has 90 days, 1short of 13 full weeks
In leap years, quarter 1has 13 full weeks so is not affected by trading
day variation
Quarter 2is never affected by trading day variation, since the total
number of each day of the week is always equal to 13
Quarters 3and 4have 92 days, 13 full weeks plus one day
As the quarters are all very close to 13 weeks in length, it is difficult to
detect and estimate trading day effects in quarterly data. For the majority
of series trading days effects are insignificant for quarterly series.
Another effect of the arrangement of the calendar is the leap year effect.
A leap year is a year with one extra day inserted into February. The leap
year is 366 days with 29 days in February as opposed to the normal 28
days. This effect can cause regular variation in some series and therefore
needs to be removed to make a proper comparison between Februarys or
quarter ones.
X-13ARIMA-SEATS enables effects associated with arrangement of the
calendar to be removed from the series using regressors (for trading days)
or constant variables (for leap year). This adjustment is done before the
74
9.3 when to adjust for trading day 75
seasonal adjustment takes place. The adjusted series is usually referred
to as trading day adjusted series if the series is adjusted for trading days
and leap year only or calendar adjusted series if the series is adjusted for
trading days, leap year and moving holidays (for example, Easter). Trading
day adjusted series and calendar adjusted series are sometimes required
by Eurostat and are routinely published in some European countries for
their national accounts.
Another type of calendar-related effect, usually grouped with trading
day effects, is the effect of variation in the length of calendar periods
(months or quarters). To understand the use of this, we can take indus-
trial output in June and July as an example for comparison. The industrial
output in June and July may differ systematically for two reasons: firstly,
the average output per day may differ from June to July because of differ-
ences in demand or other factors; secondly, July has one more day than
June. With standard seasonal adjustment both these effects are regarded
as part of the seasonal pattern, and the June and July seasonal factors will
reflect both. For some purposes it could make the analysis easier to inter-
pret if we regard the first effect as the true seasonal and the second as a
calendar effect. If we apply a length of month adjustment1, the seasonal
factors will reflect this true seasonal. The overall seasonal adjustment will
be almost unchanged, because length of month and true seasonal together
come to the standard seasonal. Note that the length of month adjustment
treats all days as equal, so it is inconsistent with trading day adjustment.
Also this is not length of working month but length of calendar month,
so the example above is only realistic for an industry working seven days
a week; in other cases an appropriate length of month variable could be
defined as a user variable.
9.3 when to adjust for trading day
X-13ARIMA-SEATS provides a number of diagnostics to test a series for
the presence of trading day effects. Testing the statistical significance of
trading day regressors is discussed in greater detail in Section 9.5, which
describes the recommended procedure for testing and adjusting for trad-
ing day effects. In general, where trading day effects are found to be sta-
tistically significant, the series should be adjusted to remove these effects
from the final seasonally adjusted series. However, it is always important
to look at the results of the trading day regression and try to relate it to
the time series itself. If the results are counterintuitive (for example, they
suggest most car production takes place on Saturdays) then it is worth in-
vestigating whether there is anything in the recording of the data which is
1see Section 9.6for details
75
76 trading day
causing this result. It is better not to implement the trading results if they
are counterintuitive.
Trading day effects should not be estimated for the following types of
data:
Data that are collected on a 4,4,5week pattern. That is to say,
the recording periods in a year consists of a four times repeated
pattern of a four week recording period, followed by another four
week recording period, followed by a five week recording period.
This means that the year is divided differently from the calendar
periods described by months. This system of data collection does
not, in general, exhibit trading day effects as each collection period
contains a full number of weeks
Data that are collected at a point in time, for example the third
Thursday of a month. However, if the collection day can occur on
different days of the week, for example, the first day of a month, it
may be that there is an effect depending on the day concerned. This
can be estimated using a stock trading variable (see tdstock below)
Data that are not collected in strict calendar months. There may, in
this case, be some sort of trading day effect, but this effect should
not be estimated for using the regressors provided by X-13ARIMA-
SEATS. For further information about adjusting such data contact
TSAB
Quarterly data. Whilst it is possible to estimate trading day effects
for quarterly flows data using X-13ARIMA-SEATS, trading day ef-
fects will, in general, cancel out within the quarter
X-13ARIMA-SEATS provides different diagnostics to test for the statisti-
cal significance of trading day regressors.
9.4 options available to adjust for trading day effects
As previously noted X-13ARIMA-SEATS can fit a regression to model cer-
tain effects that result from the arrangement of the calendar, such as trad-
ing day effects. It is possible for the user to define regressors in the regres-
sion spec. X-13ARIMA-SEATS contains a number of predefined variables,
contained in the variables argument, to adjust for a variety of calendar
effects, including five different regressors that specifically adjust for the
effects of trading days; four specifically designed for flow series and one
for stock series. Three other options not specifically designed to adjust for
trading day effects but related to trading day effects are discussed in Sec-
tion 9.6; they allow the user to adjust for length of month (lom option),
length of quarter (loq option) and leap year (lpyear option) effects.
76
9.4 options available to adjust for trading day effects 77
Using the variables argument in the regression spec allows you to spec-
ify one of the following regressors to adjust for trading day effects,
tdnolpyear this is used to estimate flow trading day effects
td this is used to estimate flow trading day effects and is a combina-
tion of the tdnolpyear variable and the lpyear variable
td1nolpyear this is used to estimate flow trading day effects
td1coef this is used to estimate flow trading day effects and is a
combination of the td1nolpyear variable and the lpyear variable
tdstock [w] this estimates a day-of-week effect for stock data or in-
ventories that are reported on the day of each month
Each of these options is discussed in more detail in the following table.
Variable
name
X-13ARIMA-SEATS
Command Comments
tdnolpyear regres-
sion{variables=tdnolpyear}
It includes 6day-of-week contrast variables and it
is used for flow series only. The variable compares
the number of each weekday to the number of
Sundays in the month. Coefficients are estimates
for Monday to Saturday and Sunday can be
derived as the negative of the sum of the other
days. tdnolpyear assumes that each day has a
different effect.
td regression{variables=td}
Includes the tdnolpyear regressor as well as
estimating the effects of a leap year. The leap year
effect is handled either by re-scaling (for
transformed series) or by including the lpyear
regression variable (for untransformed series). The
td regressor cannot be used in conjunction with
tdnolpyear, td1coef, td1nolpyear or tdstock[w]
regressors in the regression spec, or the
adjust=lpyear, adjust=lom, adjust=loq
td1nolpyear regres-
sion{variables=td1nolpyear}
A weekday-weekend contrast variable that can be
used for flow series only. This is more
parsimonious than the tdnolpyear option, as there
is only one variable in the regression. The
difference between the tdnolpyear is that
td1nolpyear assumes the same effect for all the
weekdays and another for Saturdays and Sundays
rather than an effect for each day individually. The
td1nolpyear regressor cannot be used in
conjunction with td, tdnolpyear, td1coef or
tdstock[w] regressors in the regression spec.
77
78 trading day
Variable
name
X-13ARIMA-SEATS
Command Comments
td1coef regres-
sion{variables=td1coef}
Similar to the td regressor in the same way that
td1nolpyear is similar to tdnolpyear. This means
that td1coef includes the td1nolpyear regressor as
well as estimating the effects of a leap year. The
leap year effect is handled either by re-scaling (for
transformed series) or by including the lpyear
regression variable (for untransformed series). If
the td1coef regressor is used, neither td,
tdnolpyear, td1nolpyear or tdstock[w] regressors
can be used in the regression spec.
tdstock[w] regres-
sion{variables=tdstock[31]}
Estimates day-of-week effects for inventories or
other stocks that are recorded on the w-th day of
the month. This allows the user to specify a value
for w (from 1to 31), where specifying 31 will
mean that it is an end of month variable, as it will
take this to be the last day of the month for those
months with fewer than 31 days. Research
suggests that this variable is rarely significant. If
the tdstock[w] regressor is used neither td,
tdnolpyear, td1nolpyear, td1coef, lom nor loq
regressors can be used in the regression spec.
Furthermore the tdstock[w] variable cannot be
used with quarterly data.
Table 9.2: Trading day regressor options
For further information and description of handling trading day adjust-
ment with regression models used in X-13ARIMA-SEATS2.
9.5 how to adjust for trading day effect
Section 9.2and Section 9.3described when to adjust for trading day effects,
whilst Section 9.4introduced the options available in X-13ARIMA -SEATS
to adjust for different trading day effects. This section describes, firstly,
how to identify the presence of trading day effects in a series, and secondly,
the generally recommended process to adjust for trading day effects.
The general order of testing the significance of regressors is described
in Chapter 8, which discusses the regARIMA model. Chapter 8explained
how the chi-squared test should be used to test for the significance of
trading day effects. However, other methods also exist for detecting the
presence of trading day effects such as the AIC test.
This section will describe three ways of identifying whether or not trad-
ing day effects are present in a series, and then the procedure for adjusting
2see Findley et al., 1998
78
9.5 how to adjust for trading day effect 79
for trading day effects in a production run. Two different scenarios will be
outlined to set up the seasonal adjustment for the production run:
Firstly producing prior adjustments that can be fixed for a year in
the production run, in X-13ARIMA-SEATS, X-12-ARIMA and X-11-
ARIMA based programs
Secondly the recommended procedure of setting up the spec file for
a production run using a regression variable, rather than permanent
priors, which is an option that can be used only in X-12-ARIMA and
X-13ARIMA-SEATS based software.
9.5.1Testing for trading day effects with X-13ARIMA-SEATS
The spectral analysis reveals whether or not significant trading day peaks Spectral plot
are found in a seasonal adjustment. Two spectral plots are produced, one
from the first differences of the adjusted series, adjusted for extreme values
from Table E2of the output and a second of the final irregular component,
adjusted for extreme values from Table E3. From these plots, X-13ARIMA-
SEATS will estimate whether any of the peaks at predetermined frequen-
cies (the frequencies are determined by the cyclical nature of the trad-
ing day pattern) are significantly different from that of the neighbouring
peaks. If the program finds that peaks exist at the trading day cyclical fre-
quency3for further information) it will return a warning message in the
command prompt such as,
WARNING: At least one visually significant trading day
peak has been found in one or more of the estimated
spectra
This test is very sensitive and has a tendency to show trading day effects
when other diagnostics don’t (and, no doubt, sometimes when they don’t
actually exist). Nevertheless if this warning message is returned, the series
should be tested to estimate the significance of trading day effects. If this
warning message is returned when a particular trading day regressor has
been used, it may be necessary to test a different trading day regressor to
see if that performs better. For example if the td regressor has been used, it
is possible that using the td1coef regressor will perform better and could
remove the trading day peaks. The performance of different trading day
regressors can be assessed with the two tests described below but can also
be assessed by their impact on the overall performance of the seasonal
adjustment. If a warning message is still returned after a significant td
3see Findley et al., 1998
79
80 trading day
variable has been included and if resources are limited, it may be better
not to examine the series in more detail but just to retain the td variable.
The AIC test can be activated in the regression spec to evaluate whetherThe AIC test
or not a particular regressor is preferred, compared to not having that re-
gressor in the model. For example, the following may be specified,
regression{aictest=(td1coef)}
This will generate the following likelihood statistics in the output,
Likelihood statistics for model without td1coef
Likelihood Statistics
------------------------------------------------------------------
Effective number of observations (nefobs) 138
Number of parameters estimated (np) 3
Log likelihood (L) 130.8304
Transformation Adjustment -980.3013
Adjusted Log likelihood (L) -849.4709
AIC 1704.9417
AICC (F-corrected-AIC) 1705.1209
Hannan Quinn 1708.5104
BIC 1713.7235
------------------------------------------------------------------
Likelihood statistics for model with td1coef
Likelihood Statistics
------------------------------------------------------------------
Effective number of observations (nefobs) 138
Number of parameters estimated (np) 4
Log likelihood (L) 130.6730
Transformation Adjustment -980.3013
Adjusted Log likelihood (L) -849.6283
AIC 1707.2565
AICC (F-corrected-AIC) 1707.5573
Hannan Quinn 1712.0148
BIC 1718.9656
------------------------------------------------------------------
**** AICC (with aicdiff=0.00) prefers model without td1coef ****
In the above example trading day effects do not appear to be present in
this particular series, and so the td1coef would not be used to adjust this
series for trading day effects. The aictest argument compares the AICC
statistics (these are in bold in the above example, only to highlight which
statistics are compared) and depending on which model has the lower
80
9.5 how to adjust for trading day effect 81
AICC statistic, will return a line that states which model it prefers. The
above example gives an AICC statistic of 1707.5573 for the model with a
td1coef regressor and an AICC statistic of 1705.1209 for the model without
the td1coef regressor. Therefore the model without td1coef is preferred.
Note that the user should compare AICC values, only when two models
differ only with one regressor, such as td1coef.
Note that there is an additional option with aictest, namely the argu-
ment aicdiff mentioned in the tables above. The purpose of this is to avoid
extreme sensitivity to minor changes in the AICC criterion. If aicdiff is
different from the default value of zero, there is a bias in favour of the
simpler model (in this case excluding trading day variables); the tested
variable is included only if it improves the AICC criterion by at least the
amount aicdiff. This could be used in a spec which is routinely re-run in
the annual re-analysis, to reduce the risk of instability on update.
Only one trading day regressor can be tested at a time with this op-
tion, and therefore to compare the performance of different trading day
regressors the AICC statistic of each model would have to be saved and
the program re-run using the different regressor. The results of the aictest
can be saved in the log file using the savelog argument. For example, the
following regression spec would test the td variable against no td variable
and save the results of this test in the log file.
regression{
aictest=(td)
savelog=aictest
}
The AICC statistics and other specified diagnostics that could help eval-
uate the performance of the seasonal adjustment, with (or without) par-
ticular trading day regressors could be compared by saving the log file of
each run into another file, for example an Excel spreadsheet.
The aictest can be used to test the following regressors, td, tdnolpyear,
td1coef, td1nolpyear, tdstock, Easter, and user-defined regressors. NB the
aictest cannot test a specific tdstock[w] variable, only tdstock, which de-
faults to an end of month variable. If more than one type of variable is
tested, the order in which these tests are carried out is first trading day
regressors, second Easter regressors, finally user-defined regressors.
When resources are sufficient it is recommended to undertake a detailed
analysis of the series to be taken into account as well as the nature of the
series and whether or not a particular regressor would seem appropriate.
For example, in the case of a flow series, the four regressors, td, tdnolpyear,
td1coef, and td1nolpyear should be tested.
81
82 trading day
If resources are slightly more limited, the td regressor should be tested,
and where the aictest prefers the model with the td variable to use the td
variable. If the spectral analysis returns a warning that trading day peaks
are present when the td variable is specified, the user should, if resources
permit, test other trading day regressors in particular the td1coef regressor.
The AICC statistic is one of the diagnostics that should be considered in
choosing between regressors, where they are found to be significant.
The chi-squared (χ2) test is used to test the joint significance of a groupThe χ2test ant
t-values of trading day regressors. Therefore the chi-squared test statistic will only
be produced in the cases where the td, tdnolpyear and the tdstock[w] vari-
ables are used, as these variables include six day-of-week contrast vari-
ables. The td1coef and td1nolpyear variables are, for the purposes of trad-
ing day effects, only using one variable, the weekday, weekend contrast
variable and hence the t-value will provide an indication of the signifi-
cance of these variables. When a variable has been specified in the vari-
ables argument of the regression spec then t-values will be estimated for
the individual regressors and the chi-squared test will test for the joint
significance of those variables that have six day-of-week contrast variables.
In the following example the variables included in the variables argument
are td and Easter[1]. The chi-squared test is testing the joint significance
of the trading day variables only.
Regression Model
-------------------------------------------------------------------
Parameter Standard
Variable Estimate Error t-value
-------------------------------------------------------------------
Trading Day
Mon 0.0089 0.00581 1.54
Tue 0.0013 0.00591 0.22
Wed 0.0256 0.00601 4.26
Thu 0.0109 0.00590 1.84
Fri -0.0012 0.00609 -0.19
Sat -0.0177 0.00605 -2.92
*Sun (derived) -0.0278 0.00594 -4.68
Easter[1] 0.0281 0.01160 2.42
------------------------------------------------------------------
*For full trading-day and stable seasonal effects, the derived
parameter estimate is obtained indirectly as minus the sum
of the directly estimated parameters that define the effect.
Chi-squared Tests for Groups of Regressors
82
9.5 how to adjust for trading day effect 83
-------------------------------------------------------------------
Regression Effect df Chi-Square P-Value
-------------------------------------------------------------------
Trading Day 6 167.19 0.00
As the above example shows, the t-values for some days are not sig-
nificant, that is the coefficients are not significantly different from zero.
However, the chi-squared test for the trading day effect gives a p-value of
0.00 which is within the recommended 5% limit (less than or equal to 0.05)
for accepting significant trading day effects.
The t-values should be used as a test of significance for the td1coef
and td1nolpyear variables, whereas the chi-squared test should be used to
check the overall significance of either the td, tdnolpyear, or the tdstock[w]
regressors. If a variable is found to be significant, it should, in general, be
included in the model. If all the trading day regressors are found to be
significant, the AICC test and diagnostics for assessing the quality of the
seasonal adjustment should be used to determine which of them should
be selected.
9.5.2Adjust for trading day effects
Use one of the following three methods to adjust for trading day effects. Regression
Variable with Test of Significance
Once it has been decided which trading day regressor should be used to
adjust for the trading day effect, the aictest described in Section 10.5.1.2
can be used to adjust for the effect. This means that every time X-13ARIMA-
SEATS runs to estimate the seasonally adjusted series, AIC values are de-
rived for models with and without the specified trading day variable and
the optimal model will be used for forecasting. This option will provide
users with the optimal seasonally adjusted series, but will generate higher
revisions than the other two methods which will be described in the fol-
lowing sections.
This option should not be used for production run because the trading
day regressor variable is not fixed and frequent switching between models
caused by updating can cause undesirable instability in the seasonally
adjusted output. If there are some special reasons as to why this option
must be used, a nonzero value of the aicdiff argument should be used to
reduce instability.
Regression variables fixed in the model
If a particular regression variable has been identified as significant and
the best one to use for the seasonal adjustment, then the regression spec
83
84 trading day
should contain in the variables argument all the regressors that should be
included. For example, if, as in the previous example, Easter[1] and td are
found to be significant, the spec file, along with the other parameters that
have been fixed should include the following arguments in the regression
spec.
regression{
variables=(Easter[1] td)
}
This is the recommended option for the production run because the
form of the chosen regressor is fixed though the parameter values, the
trading day factors, are re-estimated each period. When a particular trad-
ing day regressor is fixed in the model, this should be included even if
it appears no longer to be significant. The decision of whether to remove
the variable or not should be taken at the point of a seasonal adjustment
review, to reduce the revisions.
If a strict revisions policy is in place it is suggested not to use this option
since the estimated trading day factors will change when new data become
available.
Permanent Prior Adjustments
Once a particular regressor has been chosen see above and Chapter 8, on
regARIMA then the trading day factors can be saved to obtain permanent
prior adjustments through the following five steps.
1. Run the spec file with your chosen settings, for example, decomposi-
tion, ARIMA model etc. Include in the regression spec with the vari-
ables and save arguments activated (NB, in order to save the trading
day factors obtained from any trading day variable the appropriate
argument is save = td for all variables). For example, if the td regres-
sor was found to be the most appropriate the regression spec would
look like this:
regression{
variables=(td)
save=(td)
}
2. The save argument will save a text file with the trading day factors
in the same directory that the log and output files are saved. If the
84
9.5 how to adjust for trading day effect 85
name of the spec file was “filename.spc” this would mean that the
trading day factors would be saved in a file called “filename.td”
3. If permanent priors are required for more than one year, then the
forecast spec should be used to set the number of forecast periods
and appendfcst=yes option should be included in the “x11 spec. For
example, the following, assuming monthly data, would provide trad-
ing day factors for three years into the future:
regression{
variables=(td)
save=(td)
}
forecast{
maxlead=36
}
x11{
appendfcst=yes
}
4. It is essential to save the “.td” file with a different name (for example:
“[filename]pp.td”) otherwise it will be overwritten the next time the
spec file would be run with the variables=(td) option
5. In order to set up the spec file for a production run, remove the re-
gression spec and use the prior adjustments that have been saved in
step 4by using the transform spec. Therefore, in the final spec file,
used for production runs, the regression spec is not used and the
transform spec is activated, as in the following:
transform{
file=(filenamepp.td)
format=x12 save
type=(permanent)
}
It should be noted that the above example has given a certain method
of saving and using the permanent priors in a particular format and so
on. There are various ways in which permanent priors can be saved and
used to transform the original series. For further information on the dif-
85
86 trading day
ferent options available see section 7.18 of the X-13ARIMA-SEATS manual
(USCB 2017).
If holiday (such as Easter) or user-defined regressor variables are used
to estimate other effects that are required to be used as permanent priors,
then the factors must be multiplied or added (depending on the transfor-
mation used) together so that they are all in one file to be used in the
transform spec. For example, if Easter[1]4and td variables have been esti-
mated and the holiday and trading day factors have been saved, save=(hol
td) is the appropriate argument in the regression spec, which saves the
respective factors in separate files with the name of the spec file and the
extension “.hol” and “.td” respectively, then these factors should be mul-
tiplied or added together and following step 4and step 5will mean that
the original series is adjusted by the prior adjustment file so that the sea-
sonal adjustment is then performed on a series with these calendar effects
removed, which should improve the quality of the seasonal adjustment.
- With the permanent priors option, the adjustment for trading day factors is fixed
as they are based only on the data that are available at the point in time when the
trading day effects are being estimated (during the annual review). If the trading
day pattern changes between annual reviews, the permanent priors will not capture
this modification so the seasonally adjusted series will not be optimal.
- It is very complicated to set up and keep up to date..
Problems:
Criteria for deciding which of the three methods should be used are as
follows.
1. Revisions policy: how strict the revisions policy is determines which
approach to use in the production runs. The use of permanent priors
is the method that gives the minimum revisions, but also gives the
less optimal seasonally adjusted series and it is very complicated to
set up and keep up to date. The second option in terms of revision
size is fixing the regression variables in the model but allowing the
coefficients to be re-estimated when new data are available. This is
the recommended method since it balances a fairly good quality of
seasonal adjustment with revision and practicality. Contrary, the use
of a regression variable with a test for significance will provide the
optimal seasonal adjustment but with the biggest revisions of the
three methods
2. Seasonal Adjustment Review: for reviewing the parameters the re-
gression variable with a test for significance should be used. It pro-
vides users with the optimal model to run the seasonal adjustment.
4see Chapter 10
86
9.6 related topics 87
9.6 related topics
Section 9.3gave specific details on the options available in X-13ARIMA -
SEATS which allow the user to adjust for trading day effects. Three related
options that in effect also make adjustments related to average daily effects
in flow series are: the length of month lom, length of quarter loq and leap
year lpyear. Each of these options is discussed in the following table. These
options are very rarely specified in practice.
Variable Name X-13ARIMA-SEATS
Command Comments
lom regres-
sion{variables=lom}
Can be used to adjust a series for effects
resulting from the differing of length of a
month. The regression includes a
length-of-month regression variable.
Cannot be used with the td, td1coef or
tdstock[w] variables.
loq regres-
sion{variables=loq}
Same as the lom option, but is used in the
case of quarterly data. Cannot be used
with the td, td1coef or tdstock[w]
variables.
lpyear regres-
sion{variables=lpyear}
Contrast variable for leap year effects.
This variable can only be used with flow
series and cannot be used in conjunction
with the td or td1coef variables.
Table 9.3: Length of time regressors used in flow series
Adjustments for length of month, length of quarter and leap years can
also be made in the transform spec5.
9.7 non-calendar data
Some data do not align strictly to calendar months and some common
problems that can arise under these circumstances are:
1. Bank holidays can switch between months. For example, in a 4-4-5
week pattern of collecting data, the late May Bank Holiday might fall
in the “May” collection period in some years and “June” in others.
These can sometimes be modelled in X-13ARIMA-SEATS. TSAB can
be contacted for more details
2. Conventional trading day adjustments are usually inappropriate, but,
particularly if the recording periods are not the same length between
years, they might have a large impact on the series
5for more details see section 7.18 of the X-13ARIMA-SEATS (2017)
87
88 trading day
3. Sometimes survey questionnaires ask for respondents to record the
exact period the response refers to, and crude adjustments are made
to calendarise the data at respondent level in the ONS. This is a dif-
ficult area; TSAB has some experience of dealing with this problem
and can be contacted for advice
4. "Phase shift" effects might occur, particularly within a 4-4-5week data
collection pattern. This is because a pattern of 4weeks, 4weeks, 5
weeks repeated throughout the year adds up to only 52 weeks, or
364 days, but there are 365 days in a normal calendar year and 366
in a leap year. This means that the collection periods will be earlier
and earlier in each successive year. Indeed, in surveys which operate
under this regime, such as the Retail Sales Inquiry or the Labour
Force Survey, either a “survey holiday week” is taken or an extra
week’s data collection is added to a 4week collection period every
5or 6years in order to roughly realign the collection periods with
calendar months. However, these moving reference periods can have
an impact on the time series, particularly in the presence of strong
seasonal patterns. These can sometimes be modelled in X-13ARIMA-
SEATS and removed from the data. Ask TSAB for more details, if
you encounter this problem.
88
10
EASTER AND OTHER MOVING HOLIDAYS
10.1 introduction
Easter Sunday is a moving holiday that can occur in either March or
April, for monthly data, or in the first or second quarter for quarterly
data. The effect on series caused by movements in the date of Easter
needs to be removed from them seasonally adjusted series that we pro-
duce. X-13ARIMA-SEATS estimates calendar effects, such as Easter effects,
by adding regressors to the regARIMA model. This chapter explains when
and how to adjust for the effects of Easter. Section 10.2illustrates the Easter
effects, Section 10.3describes when to adjust for Easter effects, Section 10.4
provides details on the options available in the X-13ARIMA-SEATS pro-
gram to adjust for Easter effects, Section 10.5explains the recommended
procedure to adjust for Easter effects and Section 10.6lists some related
topics.
10.2 the easter effects
The date of Easter Sunday is the first Sunday after the first full moon after
the 21 of March, and based on the Gregorian calendar can be anywhere be-
tween the 22 March and 25 April. As with seasonal effects, it is desirable to
estimate and remove Easter effects from time series to help interpretation.
The effects of Easter can be best understood by considering an example.
We would expect sales of chocolate to be higher in the days and weeks be-
fore Easter. If Easter occurs in March all of the additional expenditure will
occur in March. If however, Easter falls on the 25 April, the sales in March
will be lower than the previous case and higher in April. These effects
need to be removed from the seasonally adjusted series. A similar but op-
posite effect may be present in series of industrial production, where there
may be lower production in months in which Easter falls because fewer
days are worked. This effect can be removed by the X-13ARIMA-SEATS
program.
If no Easter correction is made by X-13ARIMA-SEATS, the additional
sales will initially join the SI ratios. The monthly SIs are then smoothed,
leaving the Easter effect in the irregular component. The final seasonally
adjusted series will thus show systematic peaks and troughs caused by the
effects of Easter.
89
90 easter and other moving holidays
In this respect, Easter effects can be considered similar to trading day
effects, and removing the Easter effect from the seasonally adjusted series
improves the quality of the seasonal adjustment. As with trading day ef-
fects, Easter effects can be estimated in the X-13ARIMA-SEATS program
using the regression spec. There are three options within this spec that pro-
vide pre-defined regressors that will adjust for the effects of Easter. The
regression spec also allows one further option, a user-defined regressor,
which allows users to define their own Easter holiday regressor.
10.3 when to adjust for easter effect
This section examines some methods that can be used to identify the
presence of Easter effects. An advantage of X-13ARIMA-SEATS over X-
11-ARIMA is the use of the AIC test in the regression spec that provides
diagnostics for assessing whether an Easter regressor should be included
or not. However, there are other indicators that can show the presence
of an Easter effect, such as a graphical analysis of the non seasonally ad-
justed and seasonally adjusted (without an Easter adjustment) series, the
SI ratios plot, and the E5and E6tables given in the output. Each of these
approaches is discussed in turn. The AIC test for Easter regressors is dis-
cussed in more detail in Section 10.5, where a brief introduction to the test
is provided.
The X-13ARIMA-SEATS program provides a number of diagnostics to
test a series for the presence of Easter effects. Testing the statistical signif-
icance of Easter regressors is discussed in greater detail in Section 10.5,
which describes the recommended procedure for testing and adjusting for
Easter effects. In general, where Easter effects are found to be statistically
significant, the series should be adjusted to remove these effects from the
final seasonally adjusted series. However, it is always important to look
at the results of the build up period (w) and try to relate it to the time
series itself. If the results are counterintuitive (for example, they suggest
most passengers travel the day before Easter, where w=1) then it is worth
investigating whether there is anything in the recording of the data which
is causing this result. It is better not to implement the Easter results if they
are counterintuitive.
Easter effects should not be estimated with the default X-13ARIMA-
SEATS regressors for the following types of data:
Data that are collected on a 4-4-5week pattern. That is to say, the
recording periods in a year consists of a four times repeated pat-
tern of a four week recording period, followed by another four week
recording period, followed by a five week recording period. This
means that the year is divided differently to the calendar periods
described by months. There may, in this case, be some sort of Easter
90
10.4 options available to adjust for easter effects 91
effect; however, this effect should not be estimated for using the re-
gressors provided by X-13ARIMA-SEATS
Data that are collected at a point in time for example the third Thurs-
day of a month or the 1st of the month. There may, in this case,
be some sort of Easter effect; however, this effect should not be es-
timated for using the regressors provided by X-13ARIMA-SEATS.
There is a default regressor for the case when data are collected on
the last day of each month
Data that are not collected in strict calendar months. Also, in this case
there may be some sort of Easter effect; however, this effect should
not be estimated for using the regressors provided by X-13ARIMA-
SEATS. For further information about adjusting such data contact
TSAB
X-13ARIMA-SEATS provides different diagnostics to test for the statisti-
cal significance of Easter regressors.
10.4 options available to adjust for easter effects
The X-13ARIMA-SEATS program fits a regARIMA model to estimate Easter
effects and trading day effects. It is possible for the user to define regres-
sors in the regression spec, using the user and usertype arguments. How-
ever, the X-13ARIMA-SEATS program also contains pre-defined variables
in the variables argument, to adjust for a variety of calendar effects, includ-
ing 3different regressors that specifically adjust for the effects of Easter.
The 3regressors are Easter[w], SCEaster[w] and EasterStock[w]. Each of
these regressors has a parameter that is required which details the length
of the build-up period.
91
92 easter and other moving holidays
Variable
Name
X-13ARIMA-SEATS
Command Comments
Easter[W] regression{
variables=Easter[W]}
The value of w must be supplied and states the
number of days before Easter for which the level
of daily activity changes, due to caused by the
effects of Easter. The new level of activity remains
the same from the wth day to the day before
Easter. w can take any value from 1to 25. Hence,
Easter[1] would mean that the holiday effect is
estimating the change in the level of daily activity
for the Saturday before Easter, whereas Easter[8]
assumes the change in the level of activity occurs
for the 8days before Easter Sunday.
It is possible to specify more than one of these
variables, with different values for w in order to
estimate complex effects
SCEaster[w] regression{
variables=SCEaster[w]}
The regression variable in this case is a Statistics
Canada holiday regression variable. This
regression variables assumes that the level of daily
activity changes on the (w-1)th day and remains at
the new level through to Easter Sunday. w must be
supplied and can take any value from 1to 24.
It is possible to specify more than one of these
variables, with different values for w in order to
estimate complex effects
Easterstock[w] regression{ vari-
ables=Easterstock[w]}
End of month stock Easter holiday regressor. This
is generated from the Easter[w] regressor. The
value of w can range from 1to 25
Easterstock[w] regression{ vari-
ables=Easterstock[w]}
Similar to the td regressor in the same way that
td1nolpyear is similar to tdnolpyear. This means
that td1coef includes the td1nolpyear regressor as
well as estimating the effects of a leap year. The
leap year effect is handled either by re-scaling (for
transformed series) or by including the lpyear
regression variable (for untransformed series).
If the td1coef regressor is used, neither td,
tdnolpyear, td1nolpyear or tdstock[w] regressors
can be used in the regression spec
user regression{ user=Easter
file=”Easter.txt”}
The user argument must be used in conjunction
with the usertype and data or file arguments in the
regression spec. This allows a user-defined
regression variable to be used, such asie the UK
equivalents to the pre-defined regressors in
X-13ARIMA-SEATS. If the file is held in a different
directory then the path should also be specified,
The values in this file should cover the time frame
of data including forecasts and backcasts specified
in the forecast spec
Table 10.1: Predefined Easter regressor options
92
10.5 how to adjust for easter effect 93
For further information and description of handling Easter adjustments
with the regression model used in X-13ARIMA-SEATS see Findley et al.,
1998.
10.5 how to adjust for easter effect
Section 10.2and Section 10.3described when to adjust for Easter effects,
whilst Section 10.4introduced the different options available in X-13ARIMA-
SEATS to adjust for Easter effects. This section describes in more detail
the process of using the aictest argument in the regression spec to test
the Easter[w] and user options. This section also describes the generally
recommended procedure to adjust for Easter effects.
The general order for testing the significance of regressors is described
in Chapter 8, which discusses the regARIMA model. Chapter 10 explained
how the t-value should be used to test for the significance of the chosen
Easter regressor. However, other methods, such as the AIC test, also ex-
ist for detecting the presence of Easter effects and determining the build
up period (the value of w in the Easter[w] option). This section will de-
scribe three ways of identifying whether or not Easter effects are present
in a series, and then the procedure for adjusting for Easter effects in a
production run. Two different scenarios will be outlined for setting up the
seasonal adjustment for the production run:
Firstly, the recommended procedure of setting up the specification
file for a production run using a regression variable which is an
option that can only be used in X-12-ARIMA based programs
Secondly, producing prior adjustments that can be fixed for a year’s
production run in both X-12-ARIMA and X-11-ARIMA based pro-
grams.
10.5.1Testing for Easter effects with X-13ARIMA-SEATS
The AIC test can be activated in the regression spec to evaluate whether The AIC test
or not a particular regressor is preferred, compared to not having that re-
gressor in the model. For example the following may be specified:
regression{
aictest=(Easter)
}
This will test four models: no Easter regressor, Easter[1], Easter[8] and
Easter[15].The model with the lowest AICC value will be the one that is
preferred.
93
94 easter and other moving holidays
This generates the following tables in the output:
MODEL ESTIMATION/EVALUATION
Exact ARMA likelihood estimation
Max total ARMA iterations 1500
Max ARMA iter s w/in an IGLS iterati 40
Convergence tolerance 1.00E-05
Likelihood statistics for model without Easter
Likelihood Statistics
----------------------------------------------------------------
Number of observations (nobs) 255
Effective number of observations (nefobs) 242
Number of parameters estimated (np) 9
Log likelihood 727.8055
Transformation Adjustment -1064.5352
Adjusted Log likelihood (L) -336.7297
AIC 691.4593
AICC (F-corrected-AIC) 692.2352
Hannan Quinn 704.1086
BIC 722.8598
----------------------------------------------------------------
Likelihood statistics for model with Easter[1]
Likelihood Statistics
----------------------------------------------------------------
Number of observations (nobs) 255
Effective number of observations (nefobs) 242
Number of parameters estimated (np) 10
Log likelihood 730.4800
Transformation Adjustment -1064.5352
Adjusted Log likelihood (L) -334.0551
AIC 688.1103
AICC (F-corrected-AIC) 689.0626
Hannan Quinn 702.1650
BIC 722.9996
----------------------------------------------------------------
Likelihood statistics for model with Easter[8]
Likelihood Statistics
----------------------------------------------------------------
Number of observations (nobs) 255
Effective number of observations (nefobs) 242
Number of parameters estimated (np) 10
Log likelihood 735.5112
Transformation Adjustment -1064.5352
94
10.5 how to adjust for easter effect 95
Adjusted Log likelihood (L) -329.0240
AIC 678.0480
AICC (F-corrected-AIC) 679.0004
Hannan Quinn 692.1027
BIC 712.9374
----------------------------------------------------------------
Likelihood statistics for model with Easter[15]
Likelihood Statistics
----------------------------------------------------------------
Number of observations (nobs) 255
Effective number of observations (nefobs) 242
Number of parameters estimated (np) 10
Log likelihood 740.3271
Transformation Adjustment -1064.5352
Adjusted Log likelihood (L) -324.2081
AIC 668.4161
AICC (F-corrected-AIC) 669.3685
Hannan Quinn 682.4708
BIC 703.3055
----------------------------------------------------------------
*** AICC (with aicdiff= 0.0000) prefers model with Easter[15] ***
The models are compared on the basis of the AICC values, and the one
with the lowest chosen - in the above example Easter[15] - returns the
lowest AICC value, at 669.3685. In the above example aicdiff= 0.00 means
that the regressor selected is the regressor with the lowest AICC value.
It is possible to specify that the AICC has to be at least a given amount
lower than the AICC for no regressor before it is selected. This is achieved
by using the aicdiff = n argument where n can take any value. For example
if n=100 the AICC value of any Easter regressor must be at least 100 less
than the AICC of no regressor before it is included. In the above example if
aicdiff = 100 then none of these Easter regressors would have been chosen.
This test checks only the three Easter regressors described above. If
other regressors are also specified in the aictest argument, then the tests
are performed sequentially; trading day regressors, then Easter regressors
and then user-defined regressors. In order to test a specific Easter[w] or
SCEaster[w] regressor, X-13ARIMA-SEATS should be run once with and
once without the regressor, each time saving the AICC values using the
savelog argument in the regression spec as shown below:
regression{
variables=Easter[w]
95
96 easter and other moving holidays
savelog=aictest
}
The AICC values can then be compared across different regressors or no
regressor. This option is significantly more time consuming and would be
necessary only if further analysis was deemed appropriate, if for example,
the regressor automatically chosen appeared to perform poorly.
The recommended procedure is to use the aictest=Easter argument and
use the chosen regressor either to estimate permanent priors or to set
regression variables for a production run (see below).
If the preferred model is any of Easter[1], Easter[8] or Easter[15] then, in
general the chosen regressor should be used to adjust the series for Easter
effects. A final check should be done to verify if the t-value of the selected
regressor is statistically significant.
The AIC test for a user-defined regressor variable is similar to that de-
scribed above, but the AICC values compared are for a model with and
for a model without the specified regressor. The AIC test is activated as
shown below:
regression{
aictest=(user)
}
This should be used if a user-defined regressor has been constructed to
adjust for Easter effects. Again, the model with the lowest AICC value is
chosen, and again it is possible to use the aicdiff argument. If the user-
defined Easter regressor is preferred, then it should be used to adjust for
the effects of Easter. If a series has been seasonally adjusted without any
adjustment marginparGraphical analysis of the non seasonally and sea-
sonally adjusted datafor the effects of Easter, a plot of the non seasonally
adjusted (NSA) and seasonally adjusted (SA) series may reveal the pres-
ence of an Easter effect. Figure 10.1provides an example of a time series
exhibiting an Easter effect, which has not been corrected for, when season-
ally adjusted. The seasonally adjusted series contains systematic effects
around Easter. The effect is particularly noticeable in 1997, where there is
an early Easter, 30 of March. But as the graph shows this effect is compen-
sated for in the March of other years, which results in residual seasonality
in the adjusted (SA) series. If an adjustment were made to account for the
Easter effects this would significantly improve the quality of seasonal ad-
justment.
If a series has been seasonally adjusted , without any adjustment for theGraphical analysis
of the unmodified SI
ratios effects of Easter, a plot of the unmodified SI ratios for March and April
96
10.5 how to adjust for easter effect 97
Figure 10.1: Seasonally adjusting with and without an Easter effect
may reveal the presence of an Easter effect. The graph below show the SI
ratios for March and April. In this example, the March SI ratio is lower
Figure 10.2: SI ratios for March and April for the series showing Easter effects
than the April SI ratio when Easter is in March (1997,2002,2005,2008,
2013 and 2016). Note also that in 2018, Easter fell on 1April, so that Good
Friday was in March.
The E5table produced in the output gives the month-to-month or quarter- E5and E6output
tables
to-quarter percentage change in the original series. Therefore, if an Easter
effect is present, it may be possible to see different changes in March and
April (or quarter 1and quarter 2) of those years where there is an early or
late Easter. For example, Figure 10.3shows the figures from an E5table.
Table E5shows the percentage change from month to month or quarter
to quarter in the seasonally adjusted series. In the same way as above for
the E5table, it may be possible to see a change in the values for March or
97
98 easter and other moving holidays
April in years where there is an early Easter relative to years without an
early Easter. There is a noticeable change, over 6, in the month-to-month
changes for April in 2000 and 2011, which have late Easters. In other years
the April value tends to be just around 2or 3. April also has negative val-
ues for 2012 and 2013, when Easter fell earlier on 8April and 31 March
respectively.
98
10.5 how to adjust for easter effect 99
Figure 10.3: Example of E5table
99
100 easter and other moving holidays
Table E6from X13 output shows the month-to-month or quarter-to-
quarter percentage change in the seasonally adjusted series. In the same
way as above for the E5table, it may be possible to see a change in the
values for March or April in years where there is an early Easter relative
to years without an early Easter.
10.5.2Adjust for Easter effects
Use one of the following three methods to adjust for Easter effects:
Once it has been decided which Easter regressor should be used to ad-Regression variable
with test of
significance
just for the Easter effect, the aictest described in Section 10.5.1can be used
to adjust for the effect. This means that every time X-13ARIMA-SEATS
is run to estimate the seasonally adjusted series, AIC values are derived
for models with and without the specified Easter variable and the optimal
model will be used for forecasting. This option will provide users with the
optimal seasonally adjusted series, but will generate higher revisions than
the other two methods described in the following sections.
This option should not be used for a production run because the Easter regressor
variable is not fixed and frequent switching between models caused by updating
can introduce undesirable instability in the seasonally adjusted output. If there is
a special reason why this option must be used, a non-zero value for the aicdiff
argument should be used to reduce instability
Problems:
If a particular regression variable has been identified as significant andRegression variables
fixed in the model the best one to use for the seasonal adjustment, then the regression spec
should contain in the variable argument all the regressors that should be
included. For example, if, as in the previous example, Easter[1] and td are
found to be significant, the spec file, along with the other parameters that
have been fixed should include the following arguments in the regression
spec:
regression{
variables=(Easter[1] td)
}
As with the trading-day regressors, this is the recommended option
for the production run because the form of the chosen regressor is fixed
though the parameter values, the Easter factors, are re-estimated each pe-
riod. When a particular Easter regressor is fixed in the model, this should
be included even if it appears to no longer be significant. The decision of
whether to remove the variable or not should be taken at the point of a
seasonal adjustment review, so as to reduce the number of revisions.
100
10.5 how to adjust for easter effect 101
If a strict revisions policy is in place, it is suggested not to use this option since the
estimated Easter factors will change when new data become available
Problems:
Once a particular regressor has been chosen (see above and chapters Permanent prior
adjustments
on regARIMA and on procedures for analysing series with X-13ARIMA-
SEATS) then the Easter factors can be saved in order to obtain permanent
prior adjustments. The following steps should be taken to obtain perma-
nent prior adjustments.
1. Run the spec file with your chosen settings, for example, decomposi-
tion, ARIMA model and so forth. Include in the regression spec with
the variable and save arguments activated (NB, in order to save the
Easter factors obtained from any Easter variable the appropriate ar-
gument is save = hol for all variables). For example, if the Easter[1]
regressor was found to be the most appropriate the regression spec
would look like this,
regression{
variables=(Easter[1])
save=(hol)
}
2. The save argument will save a text file with the Easter factors in the
same directory that the log and output files are saved. If the name
of the spec file was “filename.spc” this would mean that the Easter
factors would be saved in a file called “filename.hol”
3. If permanent priors are required for more than one year, then the
forecast spec should be used to set the number of forecast periods
and the appendfcst=yes option should be included in the x11 spec.
For example, the following, assuming monthly data, would provide
Easter factors for two years into the future,
regression{
variables=(Easter[1])
save=(hol)
}
forecast{
maxlead=24
}
x11{
101
102 easter and other moving holidays
appendfcst=yes
}
4. It is useful to save the “.hol” file with a different name (for example
“filenamepp.hol”) otherwise it will be overwritten the next time the
spec file is run with the variables=(Easter[1]) and save = (hol) options
5. In order to set up the spec file for a production run, remove the re-
gression spec and use the prior adjustments that have been saved in
step 4by using the transform spec. Therefore, in the final spec file,
used for production runs, the regression spec is not used and the
transform spec is activated, as in the following,
transform{
file=(filenamepp.hol)
format = x12 save
type = (permanent)
}
It should be noted that the above example has given a certain method
of saving and using the permanent priors in a particular format. There
are various ways in which permanent priors can be saved and used to
transform the original series1.
If trading day or user-defined regressor variables are used to estimate
other effects that are required to be used as permanent priors, then the fac-
tors must be multiplied or added together so that they are all in one file to
be used in the transform spec. For example, if Easter[1] and td variables
have been estimated and the holiday and trading-day factors have been
saved (save=(hol td) is the appropriate argument in the regression spec,
which saves the respective factors in separate files with the name of the
spec file and the extension “.hol” and “.td” respectively) then these factors
should be multiplied or added together, and following steps 4and 5will
mean that the original series is adjusted by the prior adjustment file so
that the seasonal adjustment is then performed on a series with these cal-
endar effects removed, which should improve the quality of the seasonal
adjustment.
1for further information on the different options available see section X-13ARIMA-SEATS,
2017
102
10.5 how to adjust for easter effect 103
with the permanent priors option, the adjustment for Easter factors are fixed as they
are only based on the data that are available at the point in time when the Easter
effects are being estimated (during the annual review). If the Easter pattern changes
between annual reviews the permanent priors will not capture this modification, so
the seasonal adjusted series will not be optimal. It is very complicated to set up and
keep up to date.
Problems:
Criteria for deciding which of the three methods should be used are as
follows:
1.Revisions Policy: How strict the revisions policy is determines which
approach to use in the production runs. The use of permanent pri-
ors is the method that gives the minimum revisions, but also gives
the less optimal seasonally adjusted series and it is very complicated
to set up and keep up-to-date. The second option in terms of revi-
sion size is fixing the regression variable in the model. This is the
recommended method since it balances a fairly good quality of sea-
sonal adjustment with revisions and practicality. Contrary, the use of
a regression variable with a test for significance will provide the op-
timal seasonal adjustment but with the biggest revisions of the three
methods
2.Seasonal Adjustment Review: for reviewing the parameters the regres-
sion variable with a test for significance should be used. It provides
users with the optimal model to run the seasonal adjustment.
10.5.3The US/UK problem
As the U.S. Census Bureau developed the X-13ARIMA-SEATS program,
the regressors that are defined in the program have been constructed to
account for the holiday as it occurs in the United States. When these re-
gressors are used on UK data, they are theoretically wrong. For example,
the Easter[1] regressor in X-13ARIMA-SEATS accounts only for Easter Sat-
urday, while the UK one should account for three extra public holidays,
Good Friday, Easter Sunday and the bank holiday Monday.
It is possible to construct a regressor that follows the public holidays
associated with Easter in the UK. The UK regressor can be computed so
as to be a UK equivalent to the Easter[w] regressors discussed above. If
a UK regressor is deemed necessary, then it must be specified using the
user-defined regressor, as shown above, and can be compared using the
aictest=user argument in the regression spec.
As empirical testing suggests that there is little difference between UK
and US regressors, it is sufficient to use the pre-defined regressors. How-
ever, if a detailed analysis is required, or there is some question over the
103
104 easter and other moving holidays
performance of the pre-defined regressors, then using a UK defined Easter
regressor may be appropriate. TSAB have investigated the impact of UK
Easter regressors on a number of ONS series, a paper on this can be found
in the ONS Survey Methodology Bulletin. For further information contact
TSAB.
10.6 ramadan effect and other moving holidays
Other examples of moving holidays include Chinese New Year, Diwali,
and Holi. Within X-13ARIMA-SEATS, only Easter has predefined moving
holidays. This section shows how to produce user- defined regressors for
seasonally adjusting the effects of moving holidays, using the example of
Ramadan. While all these moving holidays have dates based on the lunar
calendar, regressors can be created to account for any moving holiday with
predictable dates.
Ramadan is a month in the Islamic calendar, which repeats every twelve
lunar cycles, and is a moving holiday in the Gregorian calendar. Ramadan
starts at the first sighting of the new moon, and lasts for 29 or 30 days, de-
pending on the lunar cycle. Ramadan begins every calendar year approx-
imately 11 days earlier than in the previous year. For example, Ramadan
was between 12/04/2021 and 12/05/2021 and between 01/04/2022 and
01/05/2022 in the UK. When recorded in the Gregorian calendar, the ef-
fect caused by movements in the date of Ramadan needs to be removed
from the seasonally adjusted series.
During Ramadan, in countries with large Islamic populations, many
people may have fewer hours sleep, and shorter working hours. There may
also be changes in household consumption habits, leading to an increase
in consumer prices, especially those of food products. As a result, it may
be beneficial to account for the moving holiday of Ramadan as a regression
variable when seasonally adjusting.
10.6.1How to estimate and adjust for Ramadan effects
To estimate and adjust for Ramadan effects in X-13ARIMA-SEATS, a user-
defined regression variable will need to be created and saved in a file with
the extension ‘rmx’.
Similar to the choice of regressors patterns for Easter[1,8,15], the daily
distribution of regressors within Ramadan need to be decided. The strongest
effect will depend on the series being tested, so there is no definitive cor-
rect answer to this. A few possible options to consider are weighting ev-
ery day of Ramadan, just the first week of Ramadan, or the final week of
Ramadan and first week after Ramadan, centred around the holiday Eid
al-Fitr.
104
10.6 ramadan effect and other moving holidays 105
To perform time series analysis over several years, regressors would
be required for the length of the span. Ideally, the regressors would be
calculated to cover infinite time, but an approximation of a multiple of 33
years is acceptable, because there are approximately 34 lunar years in 33
years.
There are a range of options for calculating the monthly regressors:
For a crude estimate, use a continuous variable indicating the per-
centage of days with Ramadan regressor applied per month within
the period considered. For this option, the average ratio in each
month or quarter is computed, and then the average ratio of each
month of the year is subtracted from the monthly value. The long-
term average of the regressors should sum to zero
The R function genhol can be used to create regressors. For this, the
daily pattern of regressors needs to be known. Using the “rmd” argu-
ment, genhol produces dates relative to the middle day of Ramadan,
and with the number of days considered before and after this given
in the “start” and “end” arguments
A binary 365x365 table, where each column corresponds to a day of
the year, and each row corresponds to a different possible starting
date for Ramadan can be used to calculate daily regressors. Apply
daily weights to the period you want to consider, and zero for all
other dates. Find the average daily value within each calendar month,
and then for each month subtract the average value for that month
of the year, so that the long-term average sums to zero or near-zero.
The INDEX MATCH function in Excel may come in useful. The long-
term average of the regressors should sum to zero
The output can be saved as an rmx file, and read in by the spc file follow-
ing the instructions in Chapter 14. Beware that some years may have two
beginning dates for Ramadan, with the first day of Ramadan occurring in
both January and December of 1997 and 2030.
105
11
LEVEL SHIFTS AND ADDITIVE OUTLIERS
11.1 introduction
When analysing time series, analysts may need to identify possible incon-
sistencies or effects in the data. In some cases, these problems will have
an identifiable and real-world cause. For example, promotion activities to
achieve a sales goal; change in business rules, regulations and policies;
weather changes; natural disasters; international conflicts and wars; finan-
cial market crashes. The presence of such effects can affect the qualities of
the seasonal adjustment. In these situations, the analyst will normally try
to remove the inconsistency before the seasonal adjustment of the series.
This chapter will deal with two types of effect: level shifts and additive
outliers.
11.2 level shifts
11.2.1What is a level shift?
A level shift (or trend break) is defined as an abrupt but sustained change
in the underlying level of the time series. The annual seasonal pattern is
not changed. There are many potential causes of level shifts in time series,
including change in any of the following: concepts and definitions of the
survey population, the collection method, economic behaviour, legislation
or social traditions.
11.2.2Why adjust for a level shift?
Level shifts are a problem for seasonal adjustment because they will distort
the estimation of the seasonal factors if not corrected for appropriately.
Within X-13ARIMA-SEATS, the initial trend-cycle is calculated by ap-
plying a centred 12-term moving average (for monthly series) to the series
after trading day effects, Easter, and other prior adjustments have been
applied. The trend-cycle is removed from the original estimates to give an
estimate of the seasonal times irregular component (SI Ratios) and then
the seasonal factors are estimated after the replacement of extreme values.
The Henderson filters are then applied to the seasonally adjusted estimates
to produce the final trend-cycle estimate.
107
108 level shifts and additive outliers
Figure 11.1: Example of a level shift
Figure 11.2: No prior adjustment for level shift regressor
Figure 11.2shows an example where a level shift has not been corrected.
If there is an abrupt change in the level of the series, when the moving
averages are applied to the series to calculate the preliminary trend-cycle,
the estimates will be distorted. As the calculation of the irregular and
seasonal components follows on from this initial trend-cycle estimation,
they will be distorted. The resulting seasonally adjusted estimates will be
more volatile.
108
11.3 additive outliers 109
Figure 11.3: Comparing SA values with and without a level shift regressor
The trend-cycle (dashed line) shows a rapid decrease from mid-2008 to
the beginning of 2009. The trend estimates before the level shift are lower
than expected, and those following the shift are higher than expected. The
result for the seasonally adjusted series is an increased level of irregularity
around the level shift, increasing the volatility of the seasonally adjusted
series. The final seasonally adjusted and trend estimates will be mislead-
ing.
11.3 additive outliers
11.3.1What is an additive outlier?
An additive outlier is a data point which falls out of the general pattern of
the trend and seasonal component. An outlier may be caused by a random
effect, that is an extreme irregular point, or it may have an identifiable
cause such as a strike or bad weather. This chapter will deal only with the
second type of outlier, where there is an underlying economic reason that
explains the unusual behaviour of the data point. For more information
about how X-13ARIMA-SEATS deals with extreme values see Chapter 5.
Figure 11.4provides an example of a series requiring an additive outlier
regressor for seasonal adjustment.
11.3.2Why adjust for an additive outlier
Additive outliers are a problem for seasonal adjustment because the method
of seasonal adjustment is based on moving averages. These are affected by
the presence of extreme values or outliers, which can make the average un-
109
110 level shifts and additive outliers
Figure 11.4: Example of series requiring an additive outlier regressor when sea-
sonally adjusting
representative of the pattern of the series. If some adjustment or allowance
is not made for outliers, these will cause distortion in the estimates of all
the components in a time series. Seasonally adjusting the data above, with-
out allowing for the outliers, gives the following results:
Figure 11.5: Seasonal adjustment with no prior adjustment for outlier
110
11.4 how identify and adjust for level shifts and additive outliers 111
11.4 how identify and adjust for level shifts and additive
outliers
The following paragraph describes how to identify and adjust for both
level shifts and additive outliers, since the procedure to adjust for these
two discontinuities is the same. In practice, graphing the series and the
results of the regARIMA test for outliers and level shifts will provide the
best ways of identifying these features.
11.4.1Run the series in X-13ARIMA-SEATS and look at the output diagnostics
Run the series using the standard spec file in X-13ARIMA-SEATS
without checking for level shifts and additive outliers
Look at the graph of the NSA and SA series and the X-13ARIMA-
SEATS output
The identification of level shifts and additive outliers is not always as
obvious as in the examples shown in this chapter. In cases where the level
shifts and additive outliers cannot be spotted from the graphical represen-
tation of the series, an analysis of the X-13ARIMA-SEATS output can help
in the detection of level shifts and additive outliers.
Level shifts can be detected by analysing Tables E5and E6in the out-
put. These tables show the Month-on-Month (MM) (or quarter-on-quarter)
changes in the original and seasonally adjusted estimates. In fact, a level
shift will appear as a sudden large increase which is not followed by a cor-
responding decrease (or vice versa) in Tables E5and E6. The adjustment
for the level shift effectively attempts to remove this sudden change in the
level.
Additive outliers can be detected by analysing Table C17 and D13 in
addition to Table E5and E6in the output. In fact, an additive outlier will
appear as one or more zeros in the period of the outlier in Table C17,
which gives the final weights for the irregular component, and as a resid-
ual pattern of the irregular component presented in Table D13. In addition
to inspecting these four output tables, M1, M2and M3statistics should be
checked. M1, M2and M3each measure the level of the irregular compo-
nent in the series compared to the trend and the seasonal components. If
these fail (values greater than 1), this may indicate that outliers need to be
replaced as temporary prior adjustments.
11.4.2Length of the series before and after the level shift or outlier
1. The entire length of the series needs to be at least 5years to use
regARIMA
111
112 level shifts and additive outliers
2. The outlier correction analysis does not have restrictions in terms of
data available before and after the outlier
3. The level shift cannot occur on the start date of the series since the
level of the series prior to the given data is unknown
4. A level shift at the second data point cannot be distinguished from
an outlier at the start date of the series, and a level shift at the last
date of the series cannot be distinguished from an additive outlier
since the level of the series after the discontinuity is unknown. In
these situations the knowledge of the series or the use of external
information are of primary importance to prior adjust the original
series.
11.4.3Testing for level shifts and additive outliers in X13-ARIMA-SEATS
If the user wants to search simultaneously for level shifts and additive out-
liers within a span of data, the following spec could be used.
series{
title="Example of level shift and outlier search"
start=1994.1
period=4
file="mydata.txt"
}
arima{
model=(0,1,1)(0,1,1)
}
outlier{
types=(ao ls)
span=(2002.2,)
}
x11{
mode=mult
}
The outlier specification performs automatic detection of additive out-
liers and level shifts or any combination of the two using the model speci-
fied in the arima specification. After outliers (referring to any of the outlier
types mentioned above) have been identified, the appropriate regression
variables are incorporated into the model as automatically identified out-
liers.
112
11.5 definition 113
It is important to notice that this specification will detect only additive
outliers and level shifts with a particularly high critical value. In fact, the
value to which the absolute values of the outlier t-statistics are compared
depends on the number of observations included in the interval searched
for outliers. For example, if the outlier search is run for the last year of
data, the critical value will be 3.16 (compared with the standard critical
value of 1.96). This means that all the outliers with t-statistic values less
than 3.16 will not be detected using this option and that the visual check
of the NSA and SA series remains an important diagnostic in the identifi-
cation of outliers. High critical values are used to overcome the problem
of multiple testing. For more information on the default critical values for
outlier identification1
11.4.4Confirming the reason for the level shifts or additive outliers
If the X-13ARIMA-SEATS test and the graphs of the NSA and SA series
lead you to suspect a level shift or an outlier, then check which month-
s/quarters it appears in. Question if there is any evidence for suspecting
a level shift or outlier at this time point.
11.5 definition
X-13ARIMA-SEATS seasonally adjusts a time series by modelling it as at
least three unobserved components. The process of breaking down a series
into these components is known as decomposition.
There are two basic ways in which X-13ARIMA-SEATS can model sea-
sonality in order to identify and remove it. The first, and most common, is
the multiplicative model, which is of the form:
Yt=Ct×St×It(2)
where Ytis the original series, Ctis the trend-cycle, which includes
the medium and long term movements in the series, Stis the seasonal
component, which includes repeating movements at annual intervals, and
Itis the irregular component.
This decomposition model is used for most economic time series. How-
ever, a multiplicative decomposition model cannot be used when there are
negative numbers or zero values in the series.
For other series where the seasonal changes are independent of the level
of the series/the trend, the additive model will be more appropriate. It
decomposes the series as follows:
Yt=Ct+St+It(3)
1see Table 7.22 of X-13ARIMA-SEATS manual (USCB 2017)
113
114 level shifts and additive outliers
Two other decompositions available in X-13ARIMA-SEATS, log-additive
and pseudo-additive. The log-additive is an alternative to the multiplica-
tive decomposition but is rarely used when seasonally adjusting series
with the X-11 algorithm. The pseudo-additive model is sometimes used
for time series where there are non-negative values with regular zero val-
ues. For example, this could be applied to agricultural time series.
All prior adjustments will be of the same type as the decomposition
model, so for an additive model all prior adjustments are additive, and for
a multiplicative model all priors are multiplicative.
11.5.1Adjust for the level shifts or the additive outliers
If you suspect that a level shift or an outlier is present at a particularUse the regARIMA
model time point (either before or after the graphical analysis) then it should be
specifically tested for using X-13ARIMA-SEATS by including the follow-
ing specification in the spec file.
regression{
variables=(ao2002.2 ls1996.4)
}
The variables = (ao2002.2ls1996.4)command instructs X-13ARIMA-SEATS
to analyse the level shift or outlier and to create temporary priors to adjust
for the discontinuity.
This command allows the user to test and adjust for a level shift and
an additive outlier. More than one ao and/or ls may be specified in the
model. When the command is included in the regression spec, the output
includes t-tests for each regressor (ao and ls regressors) included in the
model. The definition of this test is in the regARIMA chapter.
The use of regARIMA ao and ls regressors is usually recommended if
the presence of an outlier or level shift has been previously confirmed and
the t-test absolute value is greater than 1.96.
The temporary prior adjustments derived by X-13ARIMA-SEATS are
shown in Table A8. These prior adjustments are the result of the multi-
plication (or addition) of all the temporary priors derived by ao and ls
regressors included in the model. The temporary priors adjust the level of
the series before the point at which the level shift occurs and at each point
where an ao occurs without altering the annual seasonal pattern.
The use of temporary priors derived by the regARIMA approach avoids
any distortion in the estimation of the components of the series and leads
to a seasonally adjusted series that shows the discontinuity.
Figure 11.6and Figure 11.7show that the use of regressors to correct the
discrepancies in the series improve the quality of the seasonal adjustment.
114
11.5 definition 115
Figure 11.6: Difference between seasonally adjusted series when prior adjusting
for level shift (SA_T P) and no prior adjustment (SA)
Figure 11.7: Difference between seasonally adjusted series when prior adjusting
for additive outlier in 2002 quarter 1(SA_TP) and no prior adjust-
ment (SA)
High degree of irregularity in the series may hide the presence of a level
shift.
High degree of irregularity can make the estimation of the magnitude and
timing of the level shift less accurate.
When regressors are included in the variables argument they will be cor-
rected for even if they are not significant. The t-value of each regressor (or
the chi-squared of a group of regressors) should be checked to be sure of its
(their) significance.
Problems:
115
116 level shifts and additive outliers
If the user wants to search simultaneously for level shifts and additiveUse of automatic
outlier detection outliers within a span of data, the following spec should be used.
series{
title="Example of level shift and outlier search"
start=1994.1
period=4
file="mydata.txt"
}
arima{
model=(0 1 1)(0 1 1)
}
outlier{
types=(ao ls)
span=(2002.2,)
lsrun=n
critical=2.58
}
x11{
mode=mult
}
The outlier spec performs automatic detection of additive outliers and
level shifts or any combination of the two using the model specified in
the arima spec. After outliers (referring to either of the outlier types men-
tioned above) have been identified, the appropriate regression variables
are incorporated into the model as automatically identified outliers and
the model is re-estimated. The default critical value for the t-statistic is
1.96, corresponding to a p-value of 0.05, but this can be changed as in
the above example, by using the command critical. A value of 2.58 cor-
responds to a p-value of 0.01. This would find only the most statistically
significant variables.
The lsrun command computes t-statistics to test null hypotheses that
each run of 2, ..., n, ..., 5successive level shifts cancels to form a temporary
level shift. If one or more level shift t-tests indicate that a run of 2or
more successive level shifts cancel, a user-defined regressor can be used
to capture the temporary level shift effect. In this way two or more level
shifts can be replaced by one user-defined regressor. The usertype argu-
ment should be set to ls for this regressor, so the user-defined regressor is
116
11.5 definition 117
treated as level shift. An example of this is given below:
regression{
user=(myls)
usertype=ls
file="myls.rmx"
format="x12save"
}
where myls is the user-defined regressor created to take into account
of the temporary level shift. For example, if there are two level shifts that
cancel out, one in January 2002 and the other in March 2003, the regressor
has the following form:
0t < January 2002
-1January 2002 tMarch 2003
0t > March 2003
where tdefines the date of the observation.
The span command specifies start and end dates of a span of the time
series to be checked for outliers. The two dates must both lie within the
series and within the modelspan if one is specified. For more information
about modelspan using the composite or the series spec, see section 7.4
or section 7.15 of the X-13ARIMA-SEATS user manual (USCB 2017), re-
spectively. If one of the two dates is missing, for example, span = (2002.2,
), X-13ARIMA-SEATS sets the missing date on the start date or end date
of the series. For example, using the outlier specification defined above,
X-13ARIMA-SEATS searches for outliers between February 2002 and the
last data point of the series.
Automatic outlier detection is not always stable. Sometimes outliers switch
from being significant one month to being not significant the following month
and going back to being significant the next month. This instability has an
effect on the revision pattern. In fact, the revisions history of series with au-
tomatic outlier detection in place is more erratic than the revision history
without automatic outlier detection or with outlier regression variables in
the regARIMA model. This problem does not apply to series with stable sea-
sonality. This stability problem can be reduced if a shorter span is considered
in the search of outliers, for example if the outlier specification is used in the
last year of data.
Problems:
117
118 level shifts and additive outliers
It detects only outliers with a high critical value. Automatic outlier detection
does not consider outliers with a t-value between 1.96 and the critical value
set by X-13ARIMA-SEATS.
The test for automatic outlier detection may have less power at the last data
point. A level shift at the last time point of the series cannot be distinguished
from an additive outlier since the level of the series after the discontinuity
is unknown. In these situations the knowledge of the series or the use of
external information are of primary importance to prior adjust the original
series. Criteria for deciding which of the two methods should be used are
the size of the dataset and the importance of the series:
The size of the dataset being analysed influences the decision about
which of the two methods to use. If a large dataset is analysed, the
automatic search for outliers is preferable as it is less time consuming
than testing for individual outliers, easier to update, but still accurate.
The use of regressors in the model is preferable for small datasets.
Regarding the importance of the series, the manual method is more ac-
curate and produces more stable results. In this situation, though, the
automatic method can be used to monitor the series between seasonal
adjustment reviews. This will keep users informed of possible prob-
lems that have an effect on the seasonal adjustment of the latest data
points.
If the size of revisions is important, then the manual method shouldSize of revisions
be used. Although again in this situation, the automatic method could be
used to monitor the series between seasonal adjustment reviews.
118
11.6 other outlier types 119
11.6 other outlier types
Additive outliers and Level Shifts are the most common outlier types to be
used in seasonal adjustment. However, other outlier types exist to handle
more intricate corrections.
11.6.1Ramps (RP)
A Ramp is a type of outlier used when a trend is changing too quickly to
be considered a natural movement of the trend itself yet is not an instant
change where a LS would be a better option. If the trend’s change is not
instantaneous then it is often proper to do nothing and accept that the
trend is simply changing and so Rp regressors are quite a rare choice
in seasonal adjustments. The decision to use them is usually based on
whether a sharp change in trend level causes problems for the quality of
the seasonal adjustment. For example, Rp regressors have been used on
some series affected by the 2008/2009 financial crisis.
11.6.2Temporary changes (TC)
A Temporary Change is a type of outlier used when an additive outlier is
suspected to take more than one period to have its effects diminished ex-
ponentially. The rate of decay can also be set. This is usually not a default
outlier tested by X-13ARIMA-SEATS. However, if there is any information
that the effects of an AO are diminishing then a case can be made to use a
TC instead.
119
12
DECOMPOSITION MODELS
12.1 the options
Two specs are involved in the selection of the model to be used in the
seasonal adjustment decomposition, transform and x11. Those two specs
may be written, for a multiplicative decomposition2, as:
transform{
function = log
}
x11{
mode = mult
}
while, in case of an additive decomposition3, as:
transform{
function = none
}
x11{
mode = mult
}
Note that in the first case {mode=mult} may be omitted, because {func-
tion=none} may be omitted, again because it is the default. However, the
explicit statement of a default value does no harm and may make the
process clearer.
121
122 decomposition models
12.2 how to decide which seasonal decomposition to use
There are two ways of identifying which model is the most appropriate:
by inspecting the graph or by analytical means.
12.2.1Graphical inspection
In many cases, inspection of the graph of the time series and knowledge
of the data will make it clear as to which decomposition model to choose.
Under the multiplicative model, the seasonality of the series is affected
by the level of the series. So, when the graph of the series shows that
the size of the seasonal peaks and troughs increase (or decrease) as the
trend rises (or falls), a multiplicative decomposition model is appropriate.
Alternatively, if the size of the seasonal peaks and troughs are independent
of the level of the trend then an additive decomposition model is more
appropriate.
Figure 12.1, for example, shows an case of a multiplicative decompo-
sition. The difference between 2002 Q4and 2003 Q1is 95, whereas the
difference between 2006 Q4and 2007 Q1is 119 and finally the difference
between 2009 Q4and 2010 Q1is 162. This shows that the seasonal troughs
increase as the trend rises and so suggests that a multiplicative decompo-
sition model is appropriate.
Figure 12.1: Example of a multiplicative decomposition
Figure 12.2shows an example of an additive decomposition. The dif-
ference in all the same periods mentioned above is 8, showing that the
size of the seasonal troughs is independent of the level of the trend, hence
suggesting an additive decomposition model is appropriate.
122
12.2 how to decide which seasonal decomposition to use 123
Figure 12.2: Example of an additive decomposition
It may not be clear from a plot of the series which of the two models
is the most appropriate; for example, when the trend is fairly flat, both
models may produce satisfactory results. A way of identifying the most
appropriate model is to use an automatic process in X-13ARIMA-SEATS.
This fits both models, calculate a goodness-of-fit statistic, the AICC test,
and choose the model with the best (lowest) AICC.
If a series or any prior adjustments contain negative numbers or zeros
then the additive model must be used. If a multiplicative model is spec-
ified, the program will generate an error and will interrupt the seasonal
adjustment run. In this case, if the series contains zero/negative values
and seems to call for a multiplicative seasonal adjustment, the constant
argument is sometimes useful. The constant argument allows the user to
specify a constant to add to the series before modelling which then allows
the automatic transformation selection procedure to be used to determine
if a log transformation should be used to transform the series. This can be
written as shown below (selecting a suitable constant, 0.0001 in this exam-
ple):
transform{
constant = 0.0001
function = auto
}
The constant argument is then removed from the series after the X-11 al-
gorithm has been performed. The value of the constant should reflect the
scale of the series and can vary in orders of magnitude. A visual check
should inform the user if the constant is appropriate.
123
124 decomposition models
The user may have some knowledge about the series that may help
to identify which model is most likely to be appropriate. In general, all
series in a subsystem of accounts will normally be adjusted using the same
decomposition model, unless a series clearly follows the other model.
The model used also affects how the seasonal and irregular components
are presented. Under a multiplicative model both these components are
given as ratios (expressed in percentage terms) which vary around 100.
With an additive model the components are differences which vary around
zero.
12.2.2Analytical approach
In the case that knowledge of the series and the graph do not help in the
decision of which decomposition to use, an automatic procedure can be
used. This is done by invoking the automatic transformation in the trans-
form spec, using the following argument:
transform{
function=auto
}
Provided the series being processed has all positive values, X-13 ARIMA-
SEATS performs an AICC-based selection to decide between a log trans-
formation and no transformation. In this case, the mode in the x11 spec is
not necessary, since it is automatically selected by X-13ARIMA-SEATS in
order to match the transformation selected for the series (mult for the log
transformation and add for no transformation).
To decide which transformation to use, and therefore which decompo-
sition model to use, X-13ARIMA-SEATS fits a regARIMA model to the
untransformed and transformed series. It chooses the log transformation
except when
AICCnolog AICClog < AICC (4)
where AICCnolog is the value of AICC from fitting the regARIMA model
to the untransformed series AICClog is the value of AICC from fitting the
regARIMA model to the transform series, and AICC is the value entered
for the aicdiff argument, with a default of -2. Negative values of AICC
bias the selection in favour of the log transformation. The default -2is
used not for statistical reasons but for convenience. Multiplicative adjust-
ment is appropriate for the great majority of official statistics series and the
use of additive decomposition is suggested only when statistical support
for additive adjustment is strong.
124
12.3 updating 125
If a regARIMA model has been specified in the regression and/or arima
specs, then the procedure uses this model to generate the AICC statistics
needed for the test. If no model is specified, the program uses the ARIMA
model (011)(011), to generate the AICC statistics.
12.3 updating
The same decomposition model should be used throughout the year. It
should not need to be changed at the annual update except in very ex-
ceptional circumstances. If the model does look as if it should be changed
then TSAB should be consulted.
125
13
MOVING AVERAGES
13.1 introduction
The X-13ARIMA-SEATS program uses Moving Average (MA) throughout
its iterations to decompose the original time series into the trend, seasonal
and irregular components, as described in Chapter 1. The program uses
moving averages for two different purposes: to estimate the trend compo-
nent and to estimate the seasonal component when X-13ARIMA-SEATS is
run automatically. It uses two different types of moving averages to esti-
mate the trend component one before the seasonal component has been
removed and one after. When the user specifies the trend moving average,
that trend moving average is used in all iterations of the X-11 algorithm.
This chapter will describe what moving averages are, the different types
of moving averages that are used, the options available in the program to
select specific types of moving averages and why these may be of use.
13.2 what are moving averages?
A moving average is a weighted average of a moving span of fixed length
of a time series. They can be used to produce a smoother version of the
time series. In the simplest cases the objective is to remove or filter out
as much as possible of the irregular component of the series, leaving the
smooth trend. Besides removing or reducing irregularity, a moving aver-
age may also be chosen because of its ability to remove a fixed seasonal
pattern. There are many forms of moving average, which differ in their
ability to remove irregularity while preserving the trend as accurately as
possible. X-13ARIMA-SEATS uses several of these forms, according to the
needs of the different stages of the program.
The simplest moving average is a symmetric moving average (an equal
number of data points either side of the target data point are included in
the average) with equal weights applied to each data point.
Consider the following time series: a1,a2, ..., at1,at,at+1, where atis
the value of the series at time point t.
If the span of data for the symmetric moving average is equal to 3and
equal weight is given to each point then the moving average at time point
2is equal to:
127
128 moving averages
u2=a1+a2+a3
3=1
3a1+1
3a2+1
3a3(5)
Where u2is the value of the moving average at time period 2. The
weights applied to each data point are equal to 1/3. As this is a mov-
ing average the average is also calculated for the next time point. Hence
the moving average at time point 3is:
u3=a2+a3+a4
3=1
3a2+1
3a3+1
3a4(6)
More generally, the moving average at time point t is:
ut=at1+at+at+1
3=1
3at1+1
3at+1
3at+1(7)
This is called a 3x1 moving average. It cannot be calculated for the first
and last points of the series, as we do not have an equal number of data
points either side of the target data points. This is known as the end-point
problem. The 3x1moving average can be generalised to take any number
of data points, each with an equal weight.
In a 5x1moving average each data point will have a weight of 1/5 and
in a 9x1 each will have a weight of 1/9. The longer the moving average
the smoother the resultant series, as it takes information from a greater
number of data points. However, with a longer moving average, the value
can be estimated for fewer points because of the end point problem. In the
case of a 9x1moving average, the average cannot be calculated for the first
four and the last four terms of the series.
A symmetric moving average with equal weights where the span has
an even number of points would estimate an average at the mid-point
between two time points. By not applying the same weight to each point,
it is possible to produce a symmetric moving average with an even length
of span. Using the notation introduced earlier, a 4x1moving average of
the first four points of a series
a1+a2+a3+a4
4=1
4a1+1
4a2+1
4a3+1
4a4(8)
would estimate an average between the second and third time periods and
a moving average of the next four points
a2+a3+a4+a5
4=1
4a2+1
4a3+1
4a4+1
4a5(9)
128
13.2 what are moving averages?129
would estimate an average between the third and fourth time periods.
An average of these two averages would then be centred at the third
time period. This is called a 2x4moving average and takes the general
form
ut=1
2at2+at1+at+at+1
4+at1+at+at+1+at+2
4=
1
8at2+1
4at1+1
4at+1
4at+1+1
8at+2
(10)
This sort of average is used to remove the seasonal component from a quar-
terly series. Although it does not give equal weights to all the data points
it is symmetric and gives equal weights to each quarter. For example, the
2x4 moving average for quarter 2will give a weight of 1/4 to quarters 1,2
and 3of the current year, 1/8 to quarter 4of the current year and 1/8 to
quarter 4of the previous year, so a total weight of 1/4 for quarter 4. This
can be used to remove seasonal effects in quarterly data. In the same way,
a2x12 moving average can be used to remove seasonal effects and provide
an estimate of the trend for a monthly series.
The X-13ARIMA-SEATS program also uses combinations of simple (equally
weighted) moving averages to estimate the seasonal component. An exam-
ple of this is the 3x3moving average, which is an average of three consec-
utive 3x1 moving averages (that is the 3x1 moving averages for t1,tand
t+1). The structure of weights for this is:
ut=1
3at2+at1+at
3+at1+at+at+1
3+at+at+1+at+2
3=
1
9at2+2
9at1+3
9at+2
9at+1+1
9at+2
(11)
Such a moving average gives more weight to observations closer the
point of interest (t) and less weight to observations further away from the
point of interest.
All these examples have used simple (equally weighted) moving aver-
ages or combinations of them. There are other moving averages which use
more complex patterns of unequal weights. Different moving average may
be derived with particular objectives such as relating to some simple local
models of series.
For example, if we suppose the series to be a linear trend with an irreg-
ular added, the simple moving averages will give the linear trend plus an
irregular which is smaller because of the averaging. The length of average
chosen will depend on how much smoothing we want to produce which
will in turn depend on how irregular the original series is.
129
130 moving averages
There is a penalty in making the average longer however because the
linear trend will seldom continue for a long time, although it may be an
adequate approximation over a short period. If the trend has some curva-
ture, using too long an average will distort it. Thus, the choice of length
of average will be a matter of balancing the objectives of smoothing and
following the trend.
Another objective may be exemplified by the 2x4 average. If a quarterly
series has a stable seasonal component, it is obvious that averaging any
four successive terms will produce a series in which the seasonal has been
cancelled out. As shown above, the 2x4 average is equivalent to taking
a4-term average and then a 2–term average, the first step will remove
the seasonal. Thus, this average applied to a seasonal quarterly series will
reduce the irregular, remove the seasonal and still preserve the trend (pro-
vided it does not curve too much). Similarly, a 2x12 moving average will
give an estimate of the trend of a seasonal monthly series.
In many cases the trend of a series has too much curvature to be ad-
equately represented by these simple averages. To avoid this problem,
X-13ARIMA-SEATS uses a family of moving averages called Henderson
averages. These have the property that they will reproduce exactly a trend
which can be represented as a cubic polynomial while producing an out-
put which has maximum smoothness for their given length. However, it
should be noted that they cannot remove a seasonal effect. The formulae
for the weights of the Henderson averages are rather complex, and so they
are not reproduced here. For more information on their design and perfor-
mance, please consult TSAB.
All the examples provided assume that the moving average is calcu-
lated at a point at which enough time series values are available before
and after the point to apply the formula. Obviously, if we are calculating
an average at or near the end of the series this will not be possible because
of the end-point problem. In such cases the X-11 part of the program pro-
vides asymmetrical approximations to the symmetric weights, which are
generally constructed by assuming that the series may be forecast in some
simple way, such as fitting a straight line by regression to the last few
points and extrapolating it.
One of the improvements in X-13ARIMA-SEATS is to provide a better
way of dealing with the end-point problem. The ARIMA part of the pro-
gram allows forecasting and backcasting of the series which allows centred
moving averages to be calculated for the first and final data points. The
moving average for these points would otherwise use asymmetric weights,
which gives a greater weight to the point itself and would therefore not
generate such stable estimates of the separate components (trend, seasonal
130
13.3 trend moving averages 131
and irregular) at those points. In practice, a combination of forecasts and
asymmetrical weights are used.
13.3 trend moving averages
The trend moving averages are weighted arithmetic averages of data along
consecutive points, as described in the previous section. There are two
types of trend moving averages used by X-13ARIMA-SEATS:
Centred simple moving averages (for example 2x12 or 2x4), and;
Henderson moving averages.
When X-13ARIMA-SEATS is used in automatic mode the simple mov-
ing average is applied at the first stage of the seasonal adjustment process
before the seasonal component has been removed. This gives a prelim-
inary estimate of the trend. Henderson moving averages are used later
in the process and are applied to successive estimates of the seasonally
adjusted series to give refined estimates of the trend. The lengths of the
Henderson moving averages are determined automatically. The user can
specify a length of Henderson filter to replace the automatic choice.
13.3.1Options for trend moving averages
Henderson moving averages: There are 50 types of Henderson moving av-
erage that can be manually chosen using the x11 spec. Any odd number
between 3and 101 inclusive can be specified. In general 9-, 13- or 23-term
averages are used for monthly data and a 5- or 7-term for quarterly data.
By default the program will choose one these if the trendma argument is
not used in the x11 spec.
The choice of a trend filter is a matter of balancing smoothing power
and flexibility of the trend. The choice is based on the I/C ratio, which
is the comparative size of the irregular variations (I) relative to those of
the trend (C). The default choice should be accepted in most cases; the
only common situation where it may be overridden is if it is necessary
to ensure that a group of series all use the same trend filter. To choose a
specific length of Henderson trend moving average using the x11 spec the
following argument should be used:
trendma = n
(where n is any odd number from 3 to 101)
131
132 moving averages
13.3.2Trend moving average selection by X-13ARIMA-SEATS
If the trend moving average is not specified by the user the default is that
the first estimate of the trend will use a centred one year moving average
and the Henderson trend moving average is selected by the algorithm
using the following criterion.
I/C Quarterly Data Monthly Data
0to 0.99 5-term 9-term
1to 3.49 5-term 13-term
3.5and over 7-term 23-term
The I/C ratio is shown in table D12 of the output (the trend estimate)
and in table F2H. The program selects a longer filter when movements in
the irregular component are large compared to movements in the trend.
Where an ARIMA model provides backcasts and forecasts a symmetric
Henderson moving average can be used. If no ARIMA model is applied,
or forecasts are shorter than the span of data required for the selected
length of moving average, then asymmetric moving averages will be used,
the weights of which are available from TSAB.
13.3.3When to change the trend moving average
In general, it is recommended that the trend moving average is selected
automatically during a seasonal adjustment review via the default option
and then fixed for production run purposes. However, in some situations it
may be necessary to change the moving averages manually. If the M4sum-
mary statistic in table F31fails it may be necessary to use a shorter moving
average as a longer moving average may be removing some pattern in the
irregular. For more information on manually changing the trend moving
averages contact TSAB.
13.4 seasonal moving averages
Seasonal moving averages are weighted arithmetic averages applied to
each month (or quarter) over all the years in the series (a particular sea-
sonal moving average is applied to each column of data, as it is presented
in the output). They are used by the X-13ARIMA-SEATS program to es-
timate the seasonal component of the series. The moving averages are
applied to the SI series (seasonal plus irregular) that is the series with the
1see Chapter 16 for further details
132
13.4 seasonal moving averages 133
trend component removed; thus, the seasonal factors for January, for ex-
ample, are obtained by smoothing the SI values for January in successive
years. This procedure is a way of estimating both the seasonal and irreg-
ular components. As with trend estimation, the choice of moving average
is a matter of balancing smoothing power against flexibility. The moving
averages that are applied are a combination of simple moving averages,
for example a 3x3moving average or a 3x5moving average (three applica-
tions of a 5-term moving average).
13.4.1Options for seasonal moving averages
As with the trend moving averages the program has a default rule to select
the length of average based on the irregularity of the SI series. It is also
possible to manually choose the seasonal moving averages applied to each
month. The seasonal filters (seasonal moving averages) that are available
include 3x1,3x3,3x5,3x9and a 3x15. If no seasonal filter is specified in the
x11 spec then the program will choose the filter automatically. The filter
chosen by the program is then applied to every month (or quarter).
The seasonal filter can be fixed using the argument seasonalma in the
x11 spec. For a 3x5moving average would be specified as follows:
x11seasonalma=s3x5
The options available using the seasonalma argument in the x11 spec
are shown below.
Name Description
msr Applies default option.
s3x1Applies a 3x1moving average to all
months/quarters.
s3x3Applies a 3x3moving average to all
months/quarters.
s3x5Applies a 3x5moving average to all
months/quarters.
s3x9Applies a 3x9moving average to all
months/quarters.
s3x15 Applies a 3x15 moving average to all
months/quarters.
stable Applies a stable seasonal filter to all
months/quarters.
133
134 moving averages
Name Description
x11default
Applies a 3x3moving average to all
months/quarters to calculate the initial
seasonal factors in each iteration, and a
3x5moving average to calculate the final
seasonal factors.
(snxm snxm
snxm snxm)
Allows the application of a specific nxm
moving average for quarter 1,2,3and 4).
The values of n and m can be different
each time, to produce separate moving
averages for each quarter.
(snxm snxm
snxm snxm
snxm snxm
snxm snxm
snxm snxm
snxm snxm)
Allows the application of a specific nxm
moving average for month 1,2,...,11 and
12.
The criterion for selection of the seasonal moving average when the
default is activated (either by not using the seasonalma argument or by
specifying seasonalma=msr), is based on the global I/S ratio, which is
shown in tables D10 and F2H of the output. The global I/S ratio measures
the relative size of irregular movements (I) and seasonal movements (S)
averaged over all months or quarters. It is used to determine what seasonal
moving average is applied using the following criteria:
I/S Seasonal moving average applied
0to 2.5 3x3
3.5to 5.5 3x5
6.5and over 3x9
The global I/S ratio is calculated using data that ends in the last full
calendar year available. If the global I/S ratio is greater than 2.5but less
than 3.5or greater than 5.5but less than 6.5(so that it does not fall in
the bands specified above) then the I/S ratio will be calculated using one
year less of data to see if the I/S ratio then falls into one of the ranges
given above. If it still does not fall into one of these ranges, the I/S ratio
is calculated with another year removed. This is repeated either until the
I/S ratio falls into one of the ranges or after five years of data have been
removed in the calculation of the I/S ratio. If after five years have been
removed and the resulting I/S ratio still does not fall into the above range,
then a 3x5moving average will be used. The purpose of this procedure is
134
13.4 seasonal moving averages 135
to avoid instability on update; for example, if a 3x5average has been used
but the updated I/S ratio falls below the lower limit for 3x5, the choice
will be changed to 3x3only if the ratio falls clearly within the band for
3x3.
As can be seen in the selection criteria, the larger the I/S ratio - indicat-
ing that the irregular component is large relative to the seasonal compo-
nent - the longer the moving average applied.
13.4.2Manual selection of seasonal moving averages
If we know that the volatility of activity in a particular month (or quarter)
is smaller or larger than in other periods, then a different seasonal moving
average may be applied for that month (or quarter). A good example of
this might be an average wage series, which includes bonus payments ev-
ery April. Bonus payments tend to be very volatile relative to other move-
ments in wages. If the default returned a 3x3moving average based on the
global I/S ratio but from table D9A in the output the I/S ratio for April
was greater than 6.5(indicating that this month is volatile, with a large
irregular component relative to the seasonal component) then as there is
an identifiable reason for this volatility, it is valid to specify the use of a
3x9average for April only by including the following line in the x11 spec.
x11{
seasonalma=(s3x3 s3x3 s3x3 s3x9 s3x3 s3x3 s3x3 s3x3 s3x3 s3x3 s3x3
s3x3)
}
The option of a 3term moving average (3x1) uses only three years of
data, which allows seasonality to change very rapidly over time. This op-
tion should not normally be used, as it will usually lead to large revisions
as new data become available. If this is to be used it will usually be in
one month and because there is a known reason for wanting to track fast
changing seasonality. For example, if a new data collection method has
been introduced but a seasonal break has not been identified, it may be
beneficial for the first few years to track this changing seasonality closely
with a shorter moving average.
The option stable means that all of the values from the month or quarter
are used to calculate the average. This average would only be suitable
where the I/S ratio is very high and in general should not be used. If
there are less than five full years of data in the series the program will
by default use the stable moving average option. It is possible to specify
a seasonal moving average for series with less than 5years of data using
the argument sfshort argument. There are two options with this argument
135
136 moving averages
either sfshort=no(default), which means that a stable seasonal filter will
be used, or sfshort=yes, which will then use the seasonal moving average
specified in the seasonalma argument.
A final option is x11default which specifies an option for the program
to use moving averages as they were used in previous version of X-11
and X-11-ARIMA. If no seasonal moving average is specified then a 3x3
moving average is used to calculate the initial seasonal factors in the first
two iterations, and then a 3x5moving average is used to calculate the final
seasonal factors. This option is not recommended.
13.4.3When to change the seasonal moving average
The default options will in general select the most appropriate moving av-
erage. However, there will be occasions when the user will need to specify
a different seasonal moving average to that identified by the program. In
order to identify those occasions when user intervention is necessary the
following guidelines provide some useful indicators.
Some of the quality statistics in table F3of the output, particularly M4,
M6, M8and M9, can indicate that changing the seasonal moving average
may be beneficial2.
SI ratios given in table D8and these ratios plotted against the seasonal
factors in table D10 can be useful in determining an appropriate moving
average. If the SI values do not closely follow the seasonal factors, it may
be appropriate to use a different moving average, as that will be a more
responsive moving average. For example, the Figure 13.1and Figure 13.2
plot the SI ratios and the seasonal factors for the month of March. In this
case a 3x5moving average has been selected and this tracks the seasonality
closely. If, however a 3x9moving average is used, this tracks the SI ratios
more vaguely and will reduce the quality of the seasonal adjustment. Use
of too short a moving average should be avoided, as it will overfit the
model.
An alternative to looking at these graphs is to look at the I/S ratios for
each month; these are shown in table D9A of the output. Caution should
be exercised when selecting a different seasonal moving average for a par-
ticular month as this may cause unwanted revisions. In the majority of
cases the automatic selection procedure of the X-13ARIMA-SEATS pro-
gram - based on the global I/S ratio, estimated from the entire series - is
sufficient.
2see Chapter 16 for more details
136
13.5 updating 137
Figure 13.1:3x5seasonal moving average
Figure 13.2: E3x9seasonal moving average
If the size of the irregular component has changed through the series,
for example if the sample size of the survey has changed, then different
moving averages may be more appropriate for different sections of the
series (as highlighted in the previous section). In this case it will usually
be best to use the length of moving average most appropriate for the re-
cent section of the series. Seasonal breaks can also distort the automatic
selection of the most appropriate seasonal moving average3.
13.5 updating
When running X-13ARIMA-SEATS for an annual update in the seasonal
adjustment review, the following steps are recommended.
1. Run the seasonal adjustment on the default trend moving average
options (the program selects the trend and seasonal moving average)
2. From the output find the Henderson trend moving average and the
seasonal moving average that are selected
3. Plot the SI ratios and seasonal components, check the I/S ratios in
table D9A and ask the producer of the series about any patterns that
3see Chapter 14
137
138 moving averages
could be adjusted for. Decide whether to change or keep the previous
moving averages
4. In the x11 spec specify the arguments trendma=n seasonalma =name
(where nis the Henderson trend identified in step 2and name is the
seasonal moving average option chosen from Steps 2and 3)
5. Use this spec file for seasonal adjustment of the series for the follow-
ing year.
13.6 summary
Moving averages are a weighted average of a moving span of fixed
length of a time series
Trend moving averages aim to eliminate the seasonal and irregular
movements to leave just the trend
The options for a trend moving average are centred moving averages
or Henderson moving averages
The trend moving averages are selected based on the I/C ratio (Ir-
regular movements/Trend movements)
Seasonal moving averages are applied to successive occurrences of
the same month and aim to remove the trend and irregular to leave
the seasonal component
The options for seasonal moving averages are the x11default (the
default option), 3x1,3x3,3x5,3x9,3x15, stable or manually fixed
seasonal moving averages for each period
The seasonal moving averages are chosen based on the I/S (Irregular
movements/Seasonal movements) ratio.
138
14
SEASONAL BREAKS
14.1 what is a seasonal break?
A seasonal break is defined as a sudden and sustained change in the sea-
sonal pattern of a series. There are many potential causes of seasonal
breaks in series, including changes in the data source, methodological
changes, or administrative changes. Seasonal breaks will often be accom-
panied by a level shift. Figure 14.1provides an example of a seasonal
break.
Figure 14.1: Example of a seasonal break: car registrations
There is a stable pattern of one major peak and one major trough per
year prior to January 1999. After January 1999, there is a sudden and per-
manent change in the seasonal pattern to two peaks and two troughs per
year. This particular change resulted from an alteration in the car registra-
tion system.
Where a seasonal series changes to become non-seasonal, it is only nec-
essary to seasonally adjust the seasonal part.
139
140 seasonal breaks
14.2 why adjust for a seasonal break?
Seasonal breaks are a problem for seasonal adjustment because the method-
ology is based on moving averages. A moving average is applied to the
seasonal irregular component (SI ratios, which can be found in the D8
table within X-13ARIMA-SEATS output) of the series to obtain the esti-
mate of the seasonal component (that will be removed by seasonal adjust-
ment). However, the moving average used for this purpose is designed to
deal with series which have a smoothly evolving “deterministic” seasonal
component plus an irregular component with stable variance. If there is
a seasonal break in the series it will be reflected in the SI ratios. When
the moving averages are applied to the SI ratios to estimate the seasonal
component, the estimate of the seasonal component will be distorted. The
result is known as leakage.
Leakage occurs when part of the variation of one component has been
incorporated into the variation of another component. The result could be
that either some seasonal variation is left in the irregular component (and
so not all the seasonal variation is removed from the seasonally adjusted
series); or some variation that is not caused by seasonality is removed from
the series. The result in both cases is increased volatility in the seasonally
adjusted series and potential residual seasonality.
In the case of seasonal breaks, the leakage is of both types. The break in
the seasonality causes distortion in the estimation of the seasonal factors
(D8table). Specifically, part of the step change at the break will leak into
the irregular component. This has the effect of making the irregular in the
vicinity of the break look larger, while turning the step change in the sea-
sonal factor into a smooth transition. Besides the distorted seasonal factors,
this has an important effect on the main diagnostic for stable seasonality
(the F-test in Table D8A); the artificially large irregulars will inflate the
residual mean square, and will reduce the F-value.
Figure 14.2shows an example of SI ratios in a series with a seasonal
break. The figure shows that there has been a sudden drop in the level
of the SI ratios for August between 1998 and 1999. All of the SI values
from 1998 are being treated as outliers. Moving averages are applied to
these ratios in order to estimate the seasonal component of the series for
August.
In this example, for the years prior to 1999, the estimates for the seasonal
factors will be lower than they would be if the seasonal break was properly
accounted for. When these seasonal factors are applied to the original data
to produce the seasonally adjusted series, some of the seasonal variation
will remain in the irregular component (it has leaked into the irregular
series), resulting in residual seasonality in the seasonally adjusted series.
Conversely, after 1999 the seasonal factor estimates are higher than they
140
14.2 why adjust for a seasonal break?141
Figure 14.2: SI ratios
should be. The result of this is that variation is removed from the season-
ally adjusted series that is not seasonal. This means that the seasonally
adjusted series will not be reflecting the economic behaviour of the series.
The result in both cases is a higher level of volatility in the seasonally
adjusted series (as shown in Figure 14.3), and a greater likelihood of revi-
sions.
Seasonal breaks cause distortion in the estimation of seasonal factors
before and after the break. This distortion is often quantitatively signifi-
cant. It can influence several years of data, depending on the length of
the moving average, and, if not corrected for, can generate a seasonal pat-
tern in the seasonally adjusted series. In the example above, where a 3x3
moving average was applied, the estimates of the seasonal factors will be
distorted for 5years. If the seasonal moving average applied to the ma-
jority of series were a 3x5moving average, the distortions in the seasonal
factors would occur for seven years. As a result, the seasonally adjusted
series would appear to be more volatile near the break and would not
reflect the underlying behaviour of the series.
Furthermore, as with trend breaks, seasonal breaks create problems in
the identification of trading day and Easter effects and in fitting an ARIMA
model. Hence, adjusting for seasonal breaks also improves other parts of
the seasonal adjustment process. Figure 14.3shows how the seasonal ad-
justment for the Car Registration series is very volatile and does not reflect
the underlying behaviour of the series when no adjustment is made for the
141
142 seasonal breaks
seasonal break. There are also periodic troughs remaining in the season-
ally adjusted series, indicating that there is residual seasonality.
Figure 14.3: No prior adjustment for seasonal break
14.3 a useful test for seasonality
The most used test for seasonality is the "Combined test for the presence
of identifiable seasonality", given after table D8A of the output from X-
13ARIMA-SEATS. We will refer to this test as the IDentifiable Seasonal-
ity Test Result (IDS). The results discussed in this chapter rely on the as-
sumption that the seasonality tests occur after all other processing that is
required. The following are examples of effects that can invalidate season-
ality tests.
Outliers
Trend or seasonal breaks
Large calendar, Easter, or trading day effects
All such effects should be investigated individually and any prior ad-
justments should be made before testing for seasonality or running sea-
sonal adjustment. The result of the IDS test is that one of the following
statements will always occur in the output file:
identifiable seasonality present
identifiable seasonality probably not present
142
14.4 how to identify and adjust for a seasonal break 143
identifiable seasonality not present
It is recommended that a series is adjusted in the first two cases and not
adjusted in the last one. However, we cannot rely on just one statistic it
is much better to consider all the time series plots and the other statistics
produced by X-13ARIMA-SEATS. There are cases when we might need to
deviate from the simple recommendation above, for example when there
are:
a) contradictory results from other statistics/plots
b) weak seasonality
c) composite time series
Often a) goes hand in hand with b) or c).
14.4 how to identify and adjust for a seasonal break
This section describes how to identify and adjust for a seasonal break. The
section has been structured following a logical order that should be used
in the process of analysing the seasonal break.
14.4.1Run the Series in X-13ARIMA-SEATS and look at the output diagnos-
tics
In some cases, there will be prior knowledge that a seasonal break is ex-
pected. In the case of the car registration series, for example, analysts knew
of the administrative change in registration procedures in advance and
that its purpose was to change the seasonal pattern. In such cases we can
go straight to the tests described in Section 14.4.3. In other cases we should
carry out a preliminary screening to see if there is any indication of a sea-
sonal break. The following steps suggest a systematic way of carrying out
this screening.
1. Run the series using the standard spec file in X-13ARIMA-SEATS
without testing for a seasonal break at any particular point
2. As a first test, look at the diagnostics in Table D8A (F-tests for sea-
sonality). If the stable seasonality tests are significant, but the moving
seasonality test is not significant, it is unlikely that there is a seasonal
break. If the moving seasonality F-value is large, the seasonality is
changing considerably, and it is worth checking to see if some of this
change occurs in steps proceed to the next check
143
144 seasonal breaks
3. Graph the series and look at the graphs of SI ratios against the sea-
sonal factors1. A seasonal break will appear as a sudden change in
the level of the SI ratios for a particular month/quarter. The adjust-
ment for the seasonal break effectively attempts to remove this sud-
den change in the level of the SI ratios
4. The seasonal break identification is not always as obvious as the ex-
ample in this chapter. In those cases where the seasonal break can-
not be spotted from the graphical representation of the series, an
analysis of the X-13ARIMA-SEATS output can help in the detection
of the break. In addition to the inspection of the SI ratios, seasonal
breaks can be detected by analysing tables C17 and E5in the out-
put: when a seasonal break occurs, C17 may show a concentration of
outliers within a particular month/quarter and E5may show a sud-
den change in the size of the month-to-month/quarter-to-¬quarter
changes for one or more months/quarters. In the example table C17
below, there is a suspected seasonal break in 2001, as seen by the
lower weights in consecutive months
C 17 Final weights for irregular component
From 1998.1 to 2003.2
Observations 22
Lower sigma limit 1.50
Upper sigma limit 2.50
--------------------------------------------------------------
1st 2nd 3rd 4th S.D.
--------------------------------------------------------------
1998 100.00 100.00 100.00 100.00 2.89
1999 100.00 100.00 100.00 100.00 2.89
2000 100.00 100.00 100.00 100.00 2.89
2001 93.77 50.55 35.04 100.00 2.87
2002 100.00 100.00 100.00 0.00 2.73
2003 0.00 100.00
1Chapter 17 -Section 17.5gives instructions on how to do this
144
14.4 how to identify and adjust for a seasonal break 145
14.4.2Testing for seasonal break using X-13ARIMA-SEATS
The regARIMA modelling stage of the program provides a function called
a seasonal change of regime variable, which is specifically designed to
model a seasonal break. If there is reason to suspect a seasonal break is
present at a particular time point then it can be specifically tested for using
X-13ARIMA-SEATS by including the following specification:
regression{
variables=(seasonal/1999.jan//)
save=(rmx)
}
This command is appropriate to the car registration series above, where
the presumed date of the break is January 1999.
The variables=(seasonal/1999.jan//) argument instructs X-13ARIMA-SEATS
to test for a fixed change in seasonal pattern from January 1999. This
is achieved by including dummy seasonal regressors prior to the break,
which take the value of 0after the break. When included in the regression
spec, the output includes t-tests for each month/quarter regressor and a
chi-squared test to verify the significance of the regressors as a group2.
This command allows the user to test, but not adjust, for a change in the
pattern of the seasonal component. This means that the data passed to
the x11 spec will still be affected by the break, and so the calculated sea-
sonal factors and the D8A F-test will be distorted in the way described.
Hence it is unwise to place any reliance in the output of the x11 spec in
the sequence above. Indeed, it may be sensible to run just the regARIMA
part at this stage, without an x11 spec, until decisions have been made on
whether a seasonal break is present.
The date specified for the change of the seasonal component (January
1999 in the example above) divides the series into two spans. The first span
contains the data for periods prior to this date and the second span con-
tains data for periods on and after this date. Including the argument vari-
ables=(seasonal/1999.jan//) in the regression spec means that X-13ARIMA-
SEATS has been asked to estimate partial change of regime variables for
the early span, where partial means that the change of the seasonal com-
ponent is restricted to the early span. This type of partial change of regime
can only be used in conjunction with another component which models
the seasonality over the whole series. This could be either a set of fixed
seasonal dummy regressors or a seasonal difference term in the model3.
2definition of these tests can be found in Chapter 8
3for example, D1in the ARIMA (p d q)(P D Q) model
145
146 seasonal breaks
With this combination, the whole series model deals with seasonality
on both sides of the break and the partial change of regime regressors es-
timate the difference between the seasonality in the two parts of the series.
This difference can then be used to construct permanent prior adjustments
to force the seasonal pattern of the latter part of the series onto the first
part. The effect of the change of regime variables is to include in the re-
gARIMA model, a set of regressor variables (11 in the case of a monthly
series, 3for quarterly) which show the contrast between one month and an-
other. If these regressor variables can be saved or generated by some other
means, they can be included as user variables with exactly the same effect
as the change of regime. In the example above, the save=(rmx) command
has been included in the regression spec to save the regressor variables
with the associated dates so that they can be used later for the seasonal
adjustment.
The use of regARIMA regressors is only recommended if the presence
of a seasonal break has been previously confirmed and the p-value from
the chi-squared test is less than 0.05. This is because the chi-squared test
is biased in defining a seasonal break as significant (it has a high type I
error). One possible drawback of the variables=(seasonal/1999.jan//) com-
mand is that the estimated effects of the permanent priors do not always
balance out, leading to the problem that the level of the series does not
remain constant. This means that the permanent priors should be checked
to see if they compensate (so that any increase must be matched by an
equal decrease), especially in current price series. The change of regime
regressors for a seasonal break will be self-compensating automatically
for an additive model, because only 11 factors are estimated, the twelfth
being calculated to make them sum to zero. For multiplicative this applies
to the logs of the seasonal break regressors, which may not cancel out ex-
actly when transformed back to the original scale, but unless the seasonal
changes are large this should not be a major effect.
14.4.3Confirming a reason for a seasonal break with the host branch
If the X-13ARIMA-SEATS test and graphics lead you to suspect a sea-
sonal break, then check which months/quarters it appears in. Ask the
host branch if there is any reason for suspecting a seasonal break at this
time point.
14.4.4Length of the series before and after the seasonal break
1. The entire length of the series in total needs to be at least 5years to
use regARIMA
146
14.4 how to identify and adjust for a seasonal break 147
2. At least 1year of data either side of the break is needed to be able to
use regARIMA as a tool for analysing the break
3. If less than 1year is available after the break, consider not publishing
the seasonally adjusted version of the series until more observations
are available. This might not be possible if the series is a component
of an aggregate, in which case adjustments will probably need to
be judgemental. In that case use external information (for example
forecasts of sales patterns produced by the car industry ahead of
registration change) or patterns in related series if possible
4. If 1-2years of data are available after the break, consider not pub-
lishing the seasonally adjusted version of the series until more obser-
vations are available. X-13¬ARIMA-SEATS can provide adjustments,
but they are generally of very poor quality and subject to large re-
visions as future observations become known. X-13ARIMA-SEATS
estimates can therefore either replace, be used in combination with,
or validate ad hoc attempts to adjust for the break
5. If 2-3years of data are available after the break, consider forecasting
1year of data beyond the end of the series using regARIMA. If the
seasonal pattern after the break looks very regular (both the model
and the SI ratios are stable), then publication of the seasonal adjust-
ment can be reinstated at this point
6. If more than 3years of data are available after the break, publication
of the seasonal adjustment can generally be reinstated. But if the
model is exceptionally poor, the series is exceptionally erratic or SI
ratios are exceptionally inconsistent between years, do not reinstate
publication at this point.
14.4.5Adjust for the seasonal break
Use one of the three following methods to adjust for the seasonal break.
It is possible to use the regARIMA modelling capabilities of X-13 ARIMA- Use of regARIMA
to derive permanent
priors
SEATS to calculate the permanent prior adjustments. As discussed above,
the effect of a change of regime can be reproduced by including appro-
priate user variables. These variables can be generated by formula or by
saving the regression matrix in a run with a change of regime: the latter is
probably the easier approach.
If both arguments variables=(seasonal/1999.jan//) and save=(rmx) are
included in a spec file then the regressors for the change of regime vari-
able will be saved in a file with the extension “.rmx”. To then adjust for
the seasonal break it is necessary to re-run the spec file removing the
147
148 seasonal breaks
variables=(seasonal/1999.jan//) and save=(rmx) arguments from the re-
gression spec and including the variables previously saved in the “.rmx”
file as user-defined regression variables. For a monthly series there should
be 11 variables in the “.rmx” file, so the spec could be of the following
form:
regression{
user= (M1, M2, M3, M4, M5, M6, M7, M8, M9, M10, M11)
file=name. rmx
format="x13save"
}
x11{
mode=mult final=user
}
where “name.rmx” is the “.rmx” file generated when you use the save=rmx
option in the “name.spc” file. One important point is to ensure that the
“.rmx” file only contains the 11 change of regime variables. If other regres-
sors had been included when the “.rmx” file was saved then these regres-
sors will also be included. To avoid this, either remove all other regressors
when saving the “.rmx” file or manually remove the extra columns from
the “.rmx” file.
There are two ways of ensuring that the change of regime regressors are
reflected in the final seasonal adjustment. One way is shown above, with
the inclusion of final=user in the x11 spec. The alternative is to include
the argument usertype=seasonal in the user argument of the regression
spec. These should not be used together. The usertype method includes
the prior adjustment as part of the seasonal component, while the final
method treats it as an ordinary prior. As a result, although the two meth-
ods give the same final seasonally adjusted series they give somewhat dif-
ferent quality diagnostics (the M and Q statistics) because of the different
breakdown of the original series.
The permanent priors derived by X-13ARIMA-SEATS are shown in table
A9(or A10 if the usertype argument is used in the regression spec). These
prior adjustments can also be derived from the parameter estimates of the
regression model used to parameterise the seasonal component. In other
words the permanent priors are equal to the parameter estimates them-
selves if the series is additive and a seasonal variable has been included in
the regression spec in conjunction with a change in regime option. The per-
manent priors, over any single year, should average out to approximately
100, for multiplicative cases.
148
14.4 how to identify and adjust for a seasonal break 149
The permanent priors derived by the regARIMA regression adjust for
the leakage of the seasonal variation into the irregular component, and
the estimated seasonally adjusted series and trend component are more
robust as a result. Figure 14.4shows the improvements in the result of
seasonal adjustment. In fact, the SA series does not show any residual sea-
sonality before or after the break.
Figure 14.4: Seasonally adjusted car registrations prior adjusted for seasonal
break
The improvement in the seasonal adjustment can also be seen in the
SI ratios in Figure 14.5. The SI ratios for August after the seasonal break
adjustments derived by regARIMA are much flatter, so an improved esti-
mation of the seasonal factors can be calculated. In this example the priors
have been treated as user defined and not part of the seasonal component.
If the priors had been treated as part of the seasonal component, the SI
ratios would still display the break. But the seasonal factor would contain
what appears to be a level shift.
The interpretation of the seasonal diagnostics needs to be done with care if
this approach is used. The usual Table D8a test for seasonality is based on the
series input to the X-11 phase, which will have been prior adjusted for the
seasonal break. Therefore, this test may not give a true picture of seasonality
over the whole series; it will be dominated by the seasonal behaviour after
the break. Additionally, the break adjustment applies a fixed seasonal effect
to the series before the break; if the seasonal pattern was evolving before
Problems:
149
150 seasonal breaks
Figure 14.5: SI ratios with prior adjusted for a seasonal break
the break, the effect of the break adjustment may be to magnify the relative
effect of the movement. In some circumstances, these two effects may move
the diagnostic for identifiable seasonality towards “not present”.
If the break is non-compensating, the estimated permanent priors have to be
modified so that any adjustment in one month can be balanced by a com-
pensating adjustment in another month (or spread across several months).
In this case the seasonal adjustment of the series should be run using the
modified adjustments as permanent priors in the transform spec
The analysis of seasonal breaks can be difficult in series with MCD = 1or
2a. In fact, in those series the influence of the irregular component is very
small, and the trend and seasonal components mainly drive the behaviour
of the raw data. In this situation any small change in the seasonal factors is
considered as a significant change in the seasonal pattern and produces a
p-value from the chi-squared test of less than 0.05. Therefore, for these series
the chi-squared test is less useful, meaning that a seasonal break analysis
should rely more on the SI graphs analysis, with a seasonal break only being
adjusted for if an economic reason has been confirmed
The presence of other discontinuity factors (such as additive outliers or level
shifts) not already adjusted for using regressors in the regARIMA may affect
the performance of the chi-squared test in the analysis of seasonal breaks. For
this reason, it is recommended to check the significance of the seasonal break
and to use the estimated permanent priors calculated after the adjustment for
outliers or level shifts has taken place
Depending on the nature of the seasonal pattern and how it changes, it may
be difficult to say from the data exactly when the break occurs. The chi-
150
14.4 how to identify and adjust for a seasonal break 151
squared test statistics can be significant (p-value less than 0.05) in a range
between 7months before and 9months after the actual date of the seasonal
break. Therefore, it is useful to check on the timing of the seasonal break
in the C17 output table. In fact, if C17 presents, within this range, one or
more zeros before or after the date indicated in the regression spec vari-
ables=(seasonal/1999.jan//), it may be necessary to test alternative dates for
the regressor. Of course, all this should be considered in conjunction with
the views of the host branch on when the events causing the break may have
occurred
afor more information on MCD, see Section 22.2
Although it is often easier to use the regressors, if there is more than Adjust the two
parts of the series
separately
five years of data before and after the break the two parts of the series can
be seasonally adjusted separately.
This is probably most appropriate for historical seasonal breaks where
the period of the break is not going to be revised in published data. If
the movement of the seasonally adjusted series through the period of the
break is important, treating it as one adjustment with a break is probably
preferable. Furthermore, if it is a more recent break, adjusting the two
parts of the series separately is not an option
Adjusting the two parts of the series separately can create discontinuities in
the seasonally adjusted series
It is possible to use this method only with long series that contain more than
five years of data before and after the break
Problems:
It is possible to calculate manually permanent priors for seasonal break Use of output tables
to manually
calculate the
permanent priors
from table D8of the output using the following procedure:
Run the monthly/quarterly series in X-13ARIMA-SEATS using a de-
fault spec
Use permanent, temporary priors and Easter and trading day ad-
justment if they have already been defined, otherwise, use default
settings for all options
This default run should include all the data. From Table D8take the
average of the values. within each month/quarter before the break,
and similarly the average of the values after the break
For each month/quarter divide the average before the break by the
average after the break to give the permanent prior for that mon-
th/quarter
Apply the permanent priors for the appropriate month/quarter to
all data points before the break
151
152 seasonal breaks
Permanent priors may already be pre-defined for Easter or other reasons
such as errors in the data. To incorporate these with the permanent pri-
ors for the seasonal break multiply them together and divide by 100 for
multiplicative models or add them together for additive models.
This method can be used to validate the permanent priors derived by the
regARIMA model, but it doesn’t work well with fast-moving seasonality
It may create additivity problems
Problems:
Criteria for deciding which of the three methods should be used are as
follows:
Length of the series before and after the break - The length of the se-
ries before and after the break influences the decision of which of the
three methods should be used. In fact, if 1-3years of data are available
either side of the break, method 3.5.1should be used in conjunction with
method 3.5.3to validate the quality of the derived permanent priors. If 3-5
years of data are available after the break, method 3.5.1should be used. If
more than 5years of data are available after the break, method 3.5.1and
3.5.2can be used, although method 3.5.1is preferable since it makes the
process of updating the prior adjustments easier.
Ease of use/updating The use of regressors in the model (method 3.5.1)
is easy to do and facilitates the update of the permanent priors. This is
particularly useful when less than three years of data are available after
the break and the parameters need to be re-estimated frequently until they
become stable. Also, the method for adjusting the two parts of the series
separately (3.5.2) is easy to use, but requires at least 5years of data either
side of the break. On the other hand, the manual calculation of the perma-
nent priors (method 3.5.3) is more elaborate and makes the update more
difficult.
Multiple seasonal breaks A particular strategy needs to be adopted in
this case, since it is not possible to define two or more sets of change of
regime variables in a regARIMA model to correct for seasonal disconti-
nuities. In the case of multiple seasonal breaks, it is necessary to analyse
the series in stages. Starting from the first seasonal break, test for signif-
icance using a change of regime specification, and if significant include
user variables from the saved “.rmx” file in all later stages. Repeat the pro-
cess for each of the subsequent breaks, including in the regARIMA model
change of regime regressors only for the latest break. Finally, all identified
152
14.5 quick implementation for seasonal breaks in a spec file 153
breaks will have user-defined variables, which can be used for production
running.
14.5 quick implementation for seasonal breaks in a spec
file
Here are some quick instructions for implementing seasonal breaks, if the
user has a good understanding of the seasonal break process.
14.5.1Seasonal seasonal & non-seasonal seasonal breaks
regression{
# variables = ()
variables = (seasonal/2022.12//)
save = rmx
# user= (M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11) or (Q1 Q2 Q3)
depending if monthly or quarterly
# file="name.rmx"
# format="x12save"
# usertype = (seasonal)
}
INSTRUCTIONS:
1. If a break is suspected, remove anything fixed, such as arima {model=},
regression{variables=} etc., and instead automate with automdl{},trans-
form{function=auto}. It is usually best not to put any regressors as this
could distort the break, so remove outlier{},aictest = etc. In addition,
adding regressors at this stage would insert them into the upcoming
RMX which makes the process more difficult. It is best to add the
regressors conventionally after the break has been implemented
2. Insert variables = (seasonal/xxxx.xx//) and save = rmx into the regres-
sion{} spec
3. Run
4. If break is significant (User defined regressor p-value below 0.05),
then comment out (#) the two lines in step 2and insert user/file/for-
mat/usertype lines.
153
154 seasonal breaks
Take caution with the output of the automdl{}. If the output is showing
a non-seasonal ARIMA model, then it is best to manually overwrite
with a safe alternative, such as the (011)(011) model
If the ARIMA output is: ARIMA(p 0q)(P D Q), ARIMA(p d q)(P 0Q)
or ARIMA(p 0q)(P 0Q) then this will produce a constant which will
be embedded inside the RMX. As mentioned in step 1, this should be
avoided. Either replace the 0with 1or manually remove the constant
from the RMX and insert constant later into regression{variables=}
Note:
5. At this stage regressors can be tested but keeping everything auto-
matic
6. Run
7. Now the break should be accounted for with good regressors. Check
to make sure the output looks visually acceptable then fix the auto-
matic options
TSAB currently uses this method for both Seasonal Seasonal and
Non-Seasonal Seasonal breaks. Before, TSAB only used this method
for Seasonal Seasonal and used a modelspan for Non-Seasonal
Seasonal breaks. This was changed as theoretically it is better to use an
RMX for both
It may be noticed visually on Win-X13’s overlay graph that the average
of the SA on one side of the break is too high. This is especially notice-
able for big breaks. This is not an issue as the graph is showing the D11
(non-constrained seasonal adjustment). The SAA (seasonally adjusted
values with constrained yearly totals) will not have the raised SA. The
SAA is generally what is used by official statistics.
Note:
14.5.2Seasonal non-seasonal (or any combination ending with non-seasonal)
breaks
transform{
function=log
file = "filename.ppp"
format = "x12save"
type = permanent
mode = ratio
}
x11{
154
14.5 quick implementation for seasonal breaks in a spec file 155
type=summary
}
INSTRUCTIONS:
If a break is suspected, remove anything fixed such as arima{model=},
regressionvariables= etc. . . and instead automate automdl{},transform-
function=auto. It is usually best not to put any regressors as this could
distort the break, so remove outlier, no aictest= etc... It is best to add
the regressors conventionally after the break has been implemented
Insert variables = (seasonal/xxxx.xx//) into the regression{} spec
Run
If the break is significant (p-value < 0.05), then modelspan the sea-
sonal part. This is done in the series{} spec: modelspan=(,2022.04).
The adjustments within the modelspan need to be as good as possi-
ble. Therefore, now it is fine to use regressors. Ensure that save=(d10)
is inserted in the x11{} spec
Run
Locate the D10 file that was produced, copy into Excel, and change
any D10 values in the suspected non-seasonal part to 0s if additive
or 1s if multiplicative. Optional is to extend the 0s/1s (and the dates)
for a few years, especially if new data will be added in the future
Put this into a new TXT file and save it as a PPP file with the series
name
Convert the SPC file to one that is used for non-seasonal adjustment:
remove any regressors, ARIMA model, and modelspan
In this non-seasonal adjustment SPC, read the PPP using the example
above. Remember, if multiplicative, then ‘function=log’ and ’mode =
ratio’; if additive, then ‘function=none’ and ’mode = diff
Run
Now the break should be accounted for. Check to make sure the
output looks visually acceptable.
155
15
THE EXISTENCE OF SEASONALITY
15.1 introduction
The purpose of seasonal adjustment is to remove seasonality from a time
series so that users are better able to interpret the series. In order to remove
seasonality we must:
a) decide whether the series is seasonal
b) examine how accurately the seasonal component can be esti-
mated
If there is no detectable seasonality or the seasonality is very weak and
difficult to measure there will usually be little benefit from seasonal ad-
justment, so the series should not be adjusted. Seasonality is not a well
defined concept. Roughly speaking, a seasonal pattern is a change in a
time series that is repeated a whole number of times per year. This makes
sense only for infinite series and exact repetition, which is impractical.
A more practical approach is to allow the change to vary slightly in the
short term, in both size and timing, and to drift systematically over the
longer term. Sudden changes in pattern can also be modelled. The fact
that seasonality is ill-defined implies the assessment of seasonality is sub-
jective. Even within a narrow context, such as seasonal adjustment with
X-13ARIMA-SEATS, different practitioners may disagree about whether a
series is seasonal. This chapter provided suggestions for tests of seasonal-
ity. These tests have been found to work reasonably well for the majority
of series so they are practical. However, there is a large minority of series
for which more careful analysis is required, beyond the routine use of a
single test. It is unwise to follow unthinkingly the rules below. In the more
difficult cases the analyst must balance the evidence with their judgement,
experience and wider knowledge.
15.2 contradictory statistics
Some statistics may suggest the series is seasonal and others may suggest
it is not seasonal. This is often a warning sign that something unusual is
happening and a simple decision based only on IDS would be unsound.
When the statistics are contradictory a subjective judgement must be made
about the presence of seasonality. Consideration of several statistics calcu-
lated by X-13ARIMA-SEATS and attempting to answer the following ques-
157
158 the existence of seasonality
tions will help make the decision. A plot of the unadjusted with the sea-
sonally adjusted series should be analysed: does the seasonal adjustment
make interpretation of the time series easier? Does it seem that there is
recently emerging seasonality? Do the results of the sliding spans analysis
(Chapter 18) suggest that the seasonality is changing? Does examination of
the time series plots, tables C17, E5and E6, suggest one or more seasonal
breaks (Chapter 14)? If the spectra are available, do they suggest season-
ality may be present? What is the wider context? Are related series being
classed as seasonal? For example, if the series is in current prices there
will be an associated series in constant prices or chained volume measure.
It is usual to judge both the series as seasonal or not.
15.3 weak seasonality
The IDS may change after new data are added to a time series. Often, if
the series is weakly seasonal the seasonality test alternates between not
seasonal and seasonal. It is undesirable to make frequent changes to the
policy of seasonally adjusting because this causes large revisions. The rec-
ommendation is to do the same as last time unless an unusually large
change has occurred in the time series. The following guidelines have been
found useful, but are not absolute rules.
a) If a series is being looked at for a first time then adjust it if the
seasonality test after table D8gives either "identifiable season-
ality present" or "identifiable seasonality probably not present".
Do not adjust if the test gives "identifiable seasonality not present"
b) If the series was adjusted in last year’s re-analysis then continue
adjusting it, unless the seasonality test shows absence of season-
ality and the M7is higher than 1.250 (monthly series) or 1.050
(quarterly series)
c) If the series was not adjusted in last year’s re-analysis then con-
tinue not adjusting it, unless the seasonality test shows that
there is seasonality present and the M7is lower than 1.150
(monthly series) or 0.900 (quarterly series)
It must however be emphasised that these margins may not be appro-
priate for all series. It is therefore recommended that judgement is used,
especially when the decision of whether to adjust a series or not has al-
ready changed at least once in the past. Finally, it should be mentioned
that both the IDS test and the M7are saved in the log file, if this is explic-
itly specified in the command file. This makes it easier to decide for many
series at the same time, for example when using a data metafile.
158
15.4 composite time series 159
15.4 composite time series
For sets of related time series it is quite common to perform the seasonal
adjustment at a low level of aggregation and combine the seasonally ad-
justed series to get the seasonally adjusted version of a composite series.
This process is covered in more detail in the chapter about the compos-
ite specification, Chapter 20 and Chapter 6on aggregate time series. The
problem with this approach is that there is often residual seasonality in
the composite series. If we run the X-13ARIMA-SEATS program on the
indirectly seasonally adjusted composite series the IDS test can show that
seasonality is present.
The cause of this problem is that the more volatile the irregular com-
ponent is, the more difficult for any seasonality in the series to be de-
tected and estimated accurately. Usually the irregular component is larger
for lower level series, and consequently some of the seasonal series are
deemed non-seasonal, or have their seasonality measured incorrectly. When
the lower level series are combined, the noise is reduced and the residual
seasonal components become noticeable.
X-13ARIMA-SEATS provides assistance in investigating direct versus in-
direct adjustment in the form of the composite spec. In this case, a conven-
tional spec file is provided for each component series, while for the com-
posite the series spec is replaced by a composite spec. The link between the
components and the composite is provided by an input metafile, with file-
name extension “.mta”. The program will run a conventional adjustment
for each component and for direct adjustment of the composite, while also
calculating the indirectly adjusted composite. The full range of diagnostics
is provided for each case, including the indirect composite; thus it is easy
to compare the quality of the two adjustments, and in particular to see
whether there is residual seasonality in the indirect adjustment. The com-
ponents that are not adjusted are treated by setting type=summary in the
x11 component of their spec files.
Ideally we would prefer to adjust each series individually, but it is of-
ten the case that certain constraints need to be satisfied. One option is to
use a direct adjustment and apportion the differences between the direct
and indirect adjustments to the component series. This is not easy to do,
because of the amount of calculation required and the possibility that the
constraining process will generate residual seasonality in some of the com-
ponent series.
An alternative approach is to seasonally adjust more of the component
series in order to exactly capture the part of the seasonality that is negligi-
ble for an individual component series but significant in the aggregate. To
159
160 the existence of seasonality
decide which component series should be seasonally adjusted an alterna-
tive to the IDS test can be used.
The IDS test result is based on the following tests:
1. Test for the presence of seasonality assuming stability
2. Nonparametric test for the presence of seasonality assuming stability
3. Moving seasonality test
An alternative test is to seasonally adjust a series if one of the first two
tests passes.
If more of the component series are adjusted then the indirectly adjusted
composite series is less likely to have any residual seasonality. If it does,
then adjusting all component series in the data set regardless of seasonality
tests may help, though the seasonality in these series is more difficult to
estimate correctly. Some imagination may be required in the application
of permanent priors for this method to be effective.
15.5 testing a composite dataset for seasonality
The following steps should be followed in order to test a large composite
data set for seasonality.
1. Specify the X-13ARIMA-SEATS command file as follows: x11{ savelog=(ids,
M7)}
2. Run seasonal adjustment of all series in the data set, using a data
metafile
3. Check the log file, to find the IDS test classifying each series as sea-
sonal or not seasonal
4. Use the strategy in Section 15.3to decide which of the series should
be adjusted. The M7diagnostic is given in the log file
5. Keep the seasonal adjustment of those series that in the previous
stage it was decided to adjust. For the other series, the seasonal ad-
justment is the same as the original series, with any possible calendar
effects removed
6. Derive the indirect seasonal adjustment for all aggregate series. Run
it through X-13ARIMA-SEATS to check if there is any residual sea-
sonality by IDS. If there is no residual seasonality in any of the indi-
rectly adjusted series then the seasonal adjustment is completed
160
15.5 testing a composite dataset for seasonality 161
7. If there is residual seasonality in any of the indirectly adjusted series,
then study those component series that were not adjusted in the first
place, or were adjusted only for calendar effects. Adjust those that
pass at least one of the two stable seasonality tests
8. Derive the indirect seasonal adjustment of the aggregate series again,
also using the adjusted versions of the series that were adjusted in
stage 7. Run the indirect seasonal adjustment through X-13ARIMA-
SEATS again to check for residual seasonality
9. If the IDS is "no" then the seasonal adjustment is complete. If it is not,
then try adjusting all component series regardless of the IDS. Some
imagination may be required in the application of permanent priors
to remove all residual seasonality.
161
16
X - 1 3 ARIMA-SEATS STANDARD OUTPUT
16.1 introduction
This chapter will introduce the main output files generated by X-13ARIMA-
SEATS. These include:
An output (‘.out’) file for each series that is processed
An error (‘.err’) file for each series that is processed
A log (‘.log’) file for each series processed, where certain diagnostics
requested by the user are stored
Of them, the most important is the output file, which gives the results of
the seasonal adjustment as well as useful quality diagnostics. The output
file consists of a fairly long list of tables, which are identified by a capital
letter followed by a number, and they are organised as follows.
A-tables: These tables include the original data and prior adjustment
of the original data. Any prior adjustments are specified by the user
in the transform spec, but also can be specified in the regression part
of the regARIMA model. This should also include any automatically
identified outliers or breaks
B-, C- and D-tables: A seasonal adjustment run consists of 3itera-
tions of the X-11 method. The output of the first iteration is saved
in the B-tables which are designed to estimate outliers and trading
day effects in the RegARIMA model rather than in the x11regression
spec. The output of the second iteration is saved on the C-tables and
the output of the final iteration is saved in the D-tables which pro-
vide final estimates of all components. Of course, only the D-tables
are final
E- and F-tables: These tables provide diagnostics of the seasonal ad-
justment
G-tables: These are graphics1
R-tables: These tables show the revision histories2
S-tables: These tables show the sliding spans diagnostics3
1more in Chapter 17
2more in Chapter 7and Chapter 19
3more in Chapter 18
163
164 x-13arima-seats standard output
D8Final unmodified SI ratios
D9Final replacement values for extreme SI ra-
tios
D10 Final Seasonal factors
D11 Final Seasonally adjusted series
D11.A or
SAA
Final Seasonally adjusted series with
forced yearly totals (also adjusted for trad-
ing day)
D12 Final trend-cycle
D13 Final irregular series
Table 16.1: Frequently used D-tables
Some of these tables are more important than the others and in fact the
majority of the tables are not even printed in the output unless specifically
requested by the user. Therefore, it is deemed more appropriate to organ-
ise the presentation of the output tables not by their numbers but by the
purpose they serve.
This is presented in Section 16.2and Section 16.3,Section 16.4and
Section 16.5provide new or improved diagnostics of X-13ARIMA-SEATS
for SEATS estimates. Finally, the log and error files are described in Sec-
tion 16.6.
16.2 output diagnostics
Before using the results of the seasonal adjustment, the users need to sat-
isfy themselves that the adjustment is of a good quality, in other words,
check the diagnostics. An output file from X-13ARIMA-SEATS starts by
repeating the specification file used to generate these diagnostics. It is not
a bad idea to check that the specifications are those intended by the user,
especially if alternative specifications are tried.
Table A1follows immediately after and shows the original series. Again,
it is not a bad idea to have a quick look to make sure that it is the correct
data, especially when it is imported from another file. Having a quick look
at the first and last data points to ensure that all data points have been cor-
rectly imported is a good idea and after these basic checks, the output
diagnostics should also be checked. Generally speaking, the output diag-
nostics can be classified into two types: diagnostics of the prior adjustment
and diagnostics of the seasonal adjustment.
164
16.2 output diagnostics 165
16.2.1Diagnostics of the prior adjustments
Since good prior adjustment is a prerequisite for good seasonal adjust-
ment, this implies that any external factors that affect the series are appro-
priately treated. These effects are captured either through:
1. the regression part of the regARIMA model, as it was described in
Chapter 8, or
2. by putting in prior adjustments directly by means of the transform
spec.
Table A2shows the total prior adjustments specified by the user. As
with Table A1, it is necessary to check that they are those intended by the
user. However, if both permanent and temporary priors are used, Table A2
will show their combined effect, so it will be different from each of them
taken individually.
For effects captured with the regression model, one should look at the
regARIMA fit, following the guidance of Chapter 8. However, the prior ad-
justment might be inadequate even if the regARIMA diagnostics are good.
This would be the case when significant regression variables are missing.
For example, there might be a strong trading day effect that the user did
not include or included incorrectly. But the most common cases where a
significant variable is omitted are outliers, trend or seasonal breaks. These
can be identified by means of the following diagnostics:
Automatic outlier identification: Including the outlier spec in the
spec file will enable the automatic identification of any unaccounted
outliers or level shifts. Of course, only those among them that are
valid should be included in the regression4. It should be noted that
if many outliers are automatically detected in the same month or
quarter, it could be evidence of a seasonal break
Table D8(SI ratios): If there is a sudden increase or decrease for one
or more months or quarters, this might imply a seasonal break. This
is more likely if it occurs for many months or quarters and at the
same time
Example:
In this example the fourth quarter is persistently higher than 110 up
to 1995, falling to 107 in 1996, to 103 in 1997, and finishing below 100.
This could be either because of evolving seasonality or a seasonal break.
However, the speed of this evolution (completed in just 3periods with
stability before and after), implies that it is probably a seasonal break.
4see Chapter 11
165
166 x-13arima-seats standard output
1st 2nd 3rd 4th AVGE
1991 83.7 100.6 104.1 111.9 100.1
1992 83.2 100.8 104.5 110.6 99.8
1993 84.7 100.0 104.0 112.1 100.2
1994 83.1 101.6 103.9 110.7 99.8
1995 80.9 101.1 104.9 112.9 99.9
1996 81.8 100.3 104.7 107.0 98.5
1997 89.1 100.1 104.9 103.2 99.3
1998 92.4 101.6 104.2 101.1 99.8
1999 94.1 102.8 103.6 100.1 100.1
2000 93.8 102.3 104.8 98.2 99.8
2001 94.1 104.5 102.4 98.6 99.9
2002 94.2 104.5 103.4 97.5 99.9
Table 16.2: D8Final unmodified SI ratios from 1991.1to 2002.4with 48 observa-
tions
Inspection of the first quarter supports this suspicion; whilst for the period
up to 1996 the SI ratio was between 80 and 85, in 1997 it jumps to 89 and
thereafter it is persistently above 90. Noteworthy also is that this rapid
evolution of the 1st and 4th quarters takes place at the same time, which
again supports the suspicion of a seasonal break. Note finally that one
does not need all quarters to be affected to argue that there is a seasonal
break; indeed, in the example above the 2nd and 3rd quarters are fairly
stable- the break basically consists of shifting activity between the 4th and
the 1st quarter.
Table E5(month-to-month or quarter-to-quarter changes in the un-
adjusted series): These are expected to be dominated by the seasonal
component. Thus, it is expected that at least some months/quarters
have the same sign all the time. If this pattern changes, this implies
a seasonal break
Example:
The above example is from the same output as the previous example.
One can immediately see that the sign for the 4th quarter is positive till
1996 and negative afterwards. Further, although the sign in the other quar-
ters does not change there are some significant changes in the size of the
figures: The 1st quarter rises from below -20 to single digit, the 2nd quarter
falls from 20-30 to around 10, while the 3rd quarter is affected too. This
is good evidence of a seasonal break, which probably occurred sometimes
between 1996.3and 1997.1.
166
16.2 output diagnostics 167
1st 2nd 3rd 4th AVGE
1991 21.3 4.6 8.3 11.4
1992 -24.3 24.7 6.1 8.1 3.7
1993 -22.3 18.6 5.6 10.1 3.0
1994 -24.7 24.1 4.3 8.3 3.0
1995 -24.8 28.9 6.0 8.2 4.6
1996 -26.6 26.9 9.7 5.3 3.8
1997 -18.2 7.9 2.7-0.5-2.0
1998 -8.7 10.5 1.7-1.9 0.4
1999 -4.4 11.7 1.7-2.6 1.6
2000 -6.5 9.5 3.9-4.6 0.6
2001 -2.6 11.9-1.6-1.9 1.5
2002 -2.1 12.5-0.6-5.7 1.0
Table 16.3: E 5quarter-to-quarter percent change in the original series from 1991.2
to 2002.4with 47 observations
Table E5is also useful in identifying outliers or level shifts. Out-
liers manifest themselves with a large value which is followed by a
large change of the opposite sign in the following month; level shifts
manifest themselves with large changes which are not balanced with
subsequent opposite changes
Table E6(month-to-month or quarter-to-quarter changes in the ad-
justed series): As with Table E5, outliers show up as large numbers
which are followed by a change back, while level shifts do not change
back
Table C17 (final weights of the irregular component): The weight of
each point in Table C17 is 100, unless this point has been picked up
as an outlier in the irregular component during the X-11 algorithm
iterations. Table C17 is very useful in identifying problems such as
breaks or outliers. For example, if there is a concentration of outliers
(values lower than 100) within a particular year or month this could
be indicative of a seasonal break; if outliers dominate March and
April this may indicate a need for Easter adjustments
In summary, good prior adjustment consists of the following:
Appropriate fit of the regression model
No significant variable is omitted
167
168 x-13arima-seats standard output
All outliers, level shifts and seasonal breaks have been identified and
adjusted for
Finally, it must be emphasised that the diagnostics listed above should
be used to help identify a potential problem but should not be entirely
relied upon to decide on whether the problem is significant or not. In-
stead, once a problem is identified it should be modelled in the regARIMA
model, and it is through the regression diagnostics that it will be eventu-
ally decided whether it is insignificant, or it is significant and needs to be
adjusted for. Once the user is satisfied with the quality of the prior ad-
justment the next step is to check the quality of the seasonal adjustment
itself.
16.2.2Diagnostics of the seasonal adjustment
The first thing to check is the seasonality tests in Table D8a and the M7
diagnostic. This will determine whether the series is seasonal or not, as
described in Chapter 15. If the conclusion is that the series is not seasonal
then the series should generally not be seasonally adjusted. Assuming that
the series is seasonal, the next steps should be to check other diagnostics
of the seasonal adjustment. These include the M-diagnostics in Table F3.
These take values from 0to 3, and a value higher than 1indicates a source
for potential problems for the seasonal adjustment. In particular:
M7is the most important among the M-diagnostics, showing the
amount of moving seasonality compared to stable seasonality, or in
other words how regular the seasonal pattern is. Although M7is
used as a test for existence of seasonality, it is important to remem-
ber that it is not a binary (existent/non-existent) test but it takes
continuous values
Next most important is M1, which shows how large the irregular
component is compared to the seasonal. Failure (that is a value higher
than 1) of M1implies that the irregular component is large and there-
fore it might be difficult to estimate the seasonal component accu-
rately
M6measures the irregular too but is valid only when a 3x5sea-
sonal filter is used. Failure of M6means that a filter shorter than 3x5
should be used
Next most important are the M8through M11 diagnostics, which
show the fluctuations in the seasonal component. These diagnostics
are useful in showing potential problems in the seasonal component,
such as seasonal breaks. M10 and M11 are the same as M8and M9,
168
16.2 output diagnostics 169
but only for the end of the series. Thus, comparison of M10 and M11
with M8and M9can also help identify problems at the end of the
series. It should also be noted that M10 and M11 might fail even if
there are no problems with the seasonal adjustment, for example if
the fit of the ARIMA model that was used to generate forecasts is
poor. Finally, it must be mentioned that if M7is high then M8-M11
are likely to be high as well
M4is a measure of autocorrelation in the irregular component. It is
a less important diagnostic, as good quality of seasonal adjustment
does not require an uncorrelated irregular
M2measures the amount of the irregular compared to the variance
of the raw series made stationary. As a consequence, M2may be
misleading if the series has a trend that is not well-approximated by
a straight line
M3and M5measure the irregular compared to the trend. They are
not important diagnostics.
16.2.3Other diagnostics
Other diagnostics include:
Tests for residual seasonality, shown after Table D11. If the tests
show that residual seasonality is present, it can be eliminated by
one of the following means:
If the series is very long, one might consider shortening the
series, as the cause of the problem might be that the seasonal
pattern has changed with time. This may also be resolved by
using seasonal breaks
An alternative is to change the lengths of the seasonal filters.
This also includes the option of using different filters for differ-
ent months/quarters, if appropriate
Table E6, previously mentioned as an aid to check for outliers and
breaks, can be also used to check for residual seasonality. In partic-
ular, the seasonally adjusted series is not supposed to contain any
seasonal elements. Consequently, if the month-to-month change al-
ways has the same sign for some months, this might imply residual
seasonality. However, if the same sign is present for most of the val-
ues of the table, this is probably caused by a steady trend, and not
by residual seasonality
169
170 x-13arima-seats standard output
Table D9a(moving seasonality ratio) provides the annual change of
the (preliminary) seasonal and irregular component for each mon-
th/quarter. This is used by the program to automatically select the
appropriate seasonal moving average (unless a particular filter was
specified by the user). However, sometimes it might be appropriate
to use different seasonal filters for some months or quarters. This is
the case when in a particular month/quarter the seasonal component
evolves too fast, or the irregular component fluctuates too much. In
such cases one might wish to use a shorter filter for the month/quar-
ter in question5. Table D9a can be used to identify a problem of this
kind. The second line of the table provides the fluctuation of the
seasonal component. If this is much higher for one month than the
others, it may indicate the need for a longer filter
Another criterion for heteroskedasticity is the SI ratios (from Table
D8or from the corresponding graph). If they fluctuate too much for
one month (yet not in the way that implies a seasonal break), this
may also suggest that a longer filter might be needed
Graphical output of the spectrum of some components is produced
for monthly series after the F-tables. These graphs (labelled G.0to
G.2) are the only parts of the G outputs which are produced by de-
fault. These can be used to identify significant peaks at seasonal and
trading day frequencies in the prior adjusted, seasonally adjusted
and irregular series. A peak is defined as a value which exceeds
the adjacent values by at least six stars on the plot. Any such peaks
are mentioned in a brief note just above the G.0plot. If regARIMA
modelling has been carried out, a similar plot of the spectrum of the
regARIMA residuals appears after the modelling output, with a simi-
lar note if any peaks are found. Any peaks found are also mentioned
in the console output and the error file
The QS statistic (in Table F3) can be used to test for the presence
of seasonality within a series. The QS statistic is approximately dis-
tributed as a chi-squared distribution with two degrees of freedom
and has a null hypothesis that there is no seasonality, so a p-value
less than 0.05 would indicate seasonality is present. The QS statistics
produces values for the non seasonally adjusted series, the seasonally
adjusted series, the irregular series and the residuals
Finally, useful diagnostics are X-13ARIMA-SEATS graphs, revisions
history analysis and sliding spans which are described in Chapter 17,
Chapter 19 and Chapter 18 respectively.
5for more details see Section 14.4.2
170
16.3 the results of the seasonal adjustment 171
16.3 the results of the seasonal adjustment
Once the users are satisfied that the seasonal adjustment is of good quality
(or at least as good as possible) then they can proceed and use the results
of the seasonal adjustment. Before describing the relevant output tables, it
is useful to mention that there are different lengths of output available de-
pending on how much detail is required. The user can specify the desired
output length with the print argument in the x11 spec. The options, from
the shortest to the longest output, include:
print=none: With this option X-13ARIMA-SEATS gives only the re-
sults from the estimation of the regARIMA model. In particular, it
gives the A-tables, regARIMA coefficients, residual checking (if re-
quested) and forecasts. Nothing related to the seasonal adjustment
is printed
print=brief: With this option the X-13ARIMA-SEATS output includes
everything that is printed with the “none” option, as well as basic
seasonal adjustment tables and diagnostics
print=default: Gives the same output as above, only with more sea-
sonal adjustment tables and diagnostics
With print=alltables all output tables are printed. Additionally, to
the previous option, these include the intermediate tables from the
first and second iteration of the X-11 method
Print=all gives additionally all graphs that are produced. This option
would not be recommended as the quality of the graphs is poor and
there are other graphical tools available
Next, the output tables are described, with more emphasis given to the
most important of them.
16.3.1Most important seasonal adjustment tables
Tables A6, A7, A8and A9respectively show the trading day, holiday,
outlier and user-defined regression components estimated from the re-
gARIMA model. These components include the effects of both program
and user-specified variables, as long as the latter have been assigned the
appropriate usertype. The effects given in Tables A6-A9can be used not
only for analysis, but also as prior adjustments for production running- as
an alternative to re-estimating these effects every time a new data point
becomes available.
Table B1shows the original series, after all prior adjustments - including
the regression model and automatically detected outliers. It is effectively
171
172 x-13arima-seats standard output
this series B1that goes through the X-11 algorithm. Table B1a shows the
forecasts of the prior-adjusted original series.
Table D10 shows the final seasonal component. On the top of the table
the seasonal moving average filter that was used is shown, which should
be fixed and used until the next re-analysis.
Table D11 shows the seasonally adjusted series. However, if the user
wants and has specified to constrain the annual totals then Table D11A,
also known as SAA is the appropriate table.
Table D12 shows the final trend component. The Henderson moving
average filter that was used is shown at the top of the table. This should
be fixed and used for production running until the next re-analysis.
Table D18 shows the combined trading day and holiday factors that are
used in the seasonal adjustment and it is equal to the sum (or product for
multiplicative series) of Tables A6and A7. As with those tables, it includes
the effects of both program and user-defined calendar effect variables, and
it can be used for analysis or as prior adjustment for production running-
if the calendar effects are kept constant between seasonal adjustment re-
views.
Also important are Tables C17, D8, D8a, D9, D9a, E5, E6,and F3which
were mentioned in the previous section as useful diagnostics.
16.3.2Less important seasonal adjustment tables
Theses tables are used infrequently, however a short summary is provided
in case they are useful.
Table D13 provides the final irregular component.
Table D16 is the sum (or product) of Tables D10 and D18 and shows
the total calendar and seasonal adjustment to the series.
Table E4shows the annual totals of the original series divided by the
annual totals of the seasonally adjusted series (In the case of additive sea-
sonal adjustment it is subtraction rather than division). The second column
of Table E4shows the same ratio (or difference) but for the extreme-values-
adjusted original and seasonally adjusted series. This table can be used as
a quality diagnostic, especially when the annual totals are constrained; in
that case, the more the ratio is away from 100 (or the more the difference
is away from 0in case of an additive model), the more the seasonal adjust-
ment is impacted by annual constraining.
Table E7shows the month-to-month change in the trend-cycle compo-
nent (Table D12).
Tables F2A-F2Ishow certain diagnostics in more detail. These include
changes, duration of run, or analysis of variance for certain components
of the series. Most of these diagnostics are used to derive the single-value
M-diagnostics of Table F3. Of the F2-tables it is deemed useful to mention
172
16.3 the results of the seasonal adjustment 173
Table F2E which gives the Months for Cyclical Dominance (MCD), that
is, the number of months it takes for the variation of the trend-cycle to
become larger than the variation of the irregular component. This is very
useful for presentation purposes, because if changes during spans shorter
than the MCD are presented, they will be dominated by the irregular, thus
they will be uninformative and perhaps misleading. Further, if the MCD is
greater than 6this indicates that the series is very volatile and the quality
of the seasonal adjustment is not likely to be good6.
16.3.3Tables not printed by default
The user will only need tables in this subsection for an exceptionally thor-
ough analysis. They are presented here briefly, more detail can be found
in theX-13ARIMA-SEATS user manual (USCB 2017).
Tables C1and D1print the series that go through the X-11 algorithm in
the second and third iterations. These series are the original series adjusted
for prior adjustments, regression effects, and extreme values identified in
the previous X-11 iteration.
Tables D2, D4, D5, D6and D7provide the preliminary estimates of the
components of the series in the final X-11 iteration.
Tables B2-B13 and C2-C13 are similar to the corresponding D-Tables,
but for the first and second X-11 iteration.
Table B17 is the same as Table C17, but for the first X-11 iteration.
Table B20 and Table C20 show the factors by which the extreme values
identified in the first and second X-11 iteration are adjusted before the
following (second or third) iteration.
Table C15 and Table C16 are generated only when the irregular regres-
sion is run (x11regression). Table C15 gives the regression output while
Table C16 gives the resulting trading day, holiday, etc., components.
Table D8Bis same as Table D8, only it marks any extreme values ac-
cording to whether they were identified during the regression/automatic
outlier procedure, or during the X-11 iterations. This can be useful infor-
mation for analysis purposes.
Table D12Band Table D13B show the trend and irregular components
net of extreme values identified in the regression part of the model (the
users are reminded that additive outliers and temporary changes are as-
signed to the irregular component, while level shifts and ramps are as-
signed to the trend-cycle).
Tables E1, E2and E3show the original series, the seasonally adjusted
series, and the irregular component, corrected for extreme values.
6for more information, see Section 22.2
173
174 x-13arima-seats standard output
Table E11 shows a robust estimate of the final seasonally adjusted series.
It is equivalent to Table E2, except for those points considered extreme,
which are those which have been assigned zero weight in Table C17.
Table E16 shows the final adjustment ratios.
Table F1is a smooth seasonal adjustment, derived by smoothing the
original seasonal adjustment by means of a simple moving average, the
length of which depends on the months for cyclical dominance diagnostic.
Table F4is produced only if a trading day component has been included
in the model of a monthly series. It shows the effect of the trading day
component on the monthly adjusted figures, as a function of the length of
month and the day of the week on which the month starts. It may be used
as a second check on the plausibility of the trading day effects; the user
should ask whether there is some known reason in the pattern of weekly
activity which would explain why some figures are high and some low.
The example below shows an example of the F4table.
Day of Week Component for regARIMA Trading Day Factors:
months
starting
on:
Mon Tue Wed Thu Fri Sat Sun
31-day
months
101.54 101.54 101.54 99.75 97.99 97.99 99.75
30-day
months
101.02 101.02 101.02 101.02 99.24 97.49 99.24
Leap year 100.51 ***** 100.51 ***** ***** 98.74 *****
Table 16.4: F4: multiplicative trading day component factors: day of week and
leap year factors
16.4 diagnostics of x-13arima-seats inherited from x-12arima
As the successor to X-12ARIMA, X-13ARIMA-SEATS provides diagnostics
inherited from X-12ARIMA.
The spectrum is a fundamental diagnostic for detecting the need for
seasonal and trading day adjustments because these effects are periodic
with known periods. The spectrum can also guide regARIMA modelling
decisions in various ways, as it is illustrated in the log spectral plots of
the (usually differenced and log-transformed) original and seasonally ad-
justed series and of the irregular component produced by X-13ARIMA-
SEATS7.
7see Soukup and Findley (1998) and Soukup et al. (2001) for details concerning the spec-
trum estimator and trading day frequencies
174
16.5 new or improved diagnostics of x-13arima-seats for seats estimate 175
X-13ARIMA-SEATS also includes model comparison diagnostics, such
as the out-of-sample forecast error diagnostics of X-12ARIMA and diag-
nostics of the stability of seasonal adjustment and trend estimates, such
as the revisions history diagnostics and sliding spans diagnostics. For the
sliding spans diagnostics of SEATS estimates, a new criterion for choosing
the span length is used. The span length is determined by the ARIMA
model’s seasonal moving average parameter, which generally determines
the effective length of the seasonal adjustment filter. Because SEATS filters
can have effective lengths much greater than X-11 filters, this modified cri-
terion only permits standard sliding spans comparisons to be made when
0.685 with monthly series of length thirteen years.
Summary statistics for the unstandardised residuals and the results of
normality statistics for regARIMA model residuals are also produced by
X-13ARIMA-SEATS for seasonal adjustment quality checks. Sample auto-
correlations of the residuals with the Ljung-Box can be used for diagnostic
checks to determine if the model selected is suitable for the data. The p-
values approximate the probability of observing a Q-value at least this
large when the model fitted is correct. Small p-values, customarily those
below 0.05, indicate model inadequacy.
16.5 new or improved diagnostics of x-13arima-seats for seats
estimate
For SEATS estimates, new or improved diagnostics of X-13ARIMA-SEATS
are included in the ARIMA model-based signal extraction. This section
covers:
ARIMA estimation
Derivation of the models for the components and estimators
Error analysis
Estimates of the components (levels)
Rates of growth
ARIMA estimation: Used for detecting whether the model is fitted
through test-statistics on extended residuals.
Derivation of the models for the components and estimators: Models
for the components and decomposition through WIENER- KOLMOGOROV
filters. Bias-correcting modifications for over- or underestimation of the ir-
regular component and of the stationary transforms of the seasonal, trend
and seasonally adjusted series from decomposition Yt=St+Tt+It,1
tNa finite-sample-based diagnostic are provided. It also provides a set
of associated test statistics.
175
176 x-13arima-seats standard output
The filter diagnostics - Weights for asymmetric trend concurrent estima-
tor filter (semi-infinite realisation) and transfer function and phase delay of
asymmetric trend filter (semi-infinite realisation) - for seasonal adjustment
and trend estimates suggest the extent of the trade-off between smooth-
ness and the delay or exaggeration of business cycle components in the
estimates.
Error analysis: Significance of seasonality is assessed using the vari-
ances of the total estimation error, which includes the error in the pre-
liminary estimator (the revision error) and the error in the final estimator.
Because the S.E. of the seasonal component estimator varies (it reaches
a minimum for historical estimation and a maximum for the most dis-
tant forecast), the significance of seasonality will be different for different
periods. An extreme example would be a series showing significant sea-
sonality for historical estimates that is poorly captured concurrently, and
useless for forecasting.
Estimates of the components (levels): Various model-based tests are in-
cluded in this section. These include estimates of the trend-cycle, seasonal
and irregular components with standard errors. The final estimates of the
trend-cycle, seasonal and irregular components also included. Model com-
parison diagnostics include diagnostic for difference between aggregate
and aggregate of components, and diagnostics comparison of means in
this Section.
Rates of growth: The rate-of-growth of series Z(t) over the period (t1,t2)
is expressed in percent points as (Z(t2)
Z(t1)1)·100 although these results
may be less important part of the whole output except for interested in
the annual growth.
16.6 error and log files
One error file is generated for each series that is processed through X-
13ARIMA-SEATS. This file stores the following information:
Errors in the input files. Examples include syntax errors, internal
inconsistencies of the input file, or problems with reading data files
Problems encountered during processing, which halted the proce-
dure. Singularity of the regression matrix and non-convergence are
such examples
Problems encountered during the processing, for which an auto-
matic fix was put in place, of which the user must be warned. Ex-
amples include changes to certain procedures because there is insuf-
ficient data to run them with the options specified by the user (such
as shorter spans for history analysis)
176
16.6 error and log files 177
Properties of the series identified during the processing and for which no
specific action has been taken. For example, trading day or seasonal peaks
identified in the spectrum.
When running a seasonal adjustment of many series with a data or an
input metafile, it is possible to save certain information for all series in one
file, instead of checking a large number of output files. This is achieved
using the savelog argument of the appropriate spec. The following is an
example of a spec file and the log file that was generated when it was run
for a data metafile:
series{start=1991.1
period=12
}
transform{
function=AUTO
}
automdl{
MAXORDER=(4 1)
MAXDIFF=(2 1)
savelog=(AMD MU)
}
REGRESSION{
AICTEST=(EASTER TD)
SAVELOG=AICTEST
}
X11{
SAVELOG=(IDS M7)
}
This spec file has requested to save the automatic ARIMA model se-
lected, the results of the AIC tests for Easter and trading day, and two
diagnostics of the seasonal adjustment (identifiable seasonality and M7),
as specified by the savelog argument in the appropriate specs. This infor-
mation is summarised for all series in the log file, an extract of which is
presented here:
M-ADD NI -------- -------- X-13ARIMA-SEATS run of NI
automean: not significant.
Automatic model chosen: (0 0 0)(0 1 1)
AICtd: rejected
AICeaster: rejected
Identifiable seasonality: no
M07 : 1.907
M-ADD SCOTLA -------- -------- X-13ARIMA-SEATS run of SCOTLAND
automean: not significant.
177
178 x-13arima-seats standard output
Automatic model chosen: (0 0 0)(0 1 1)
AICtd: rejected
AICeaster: rejected
Identifiable seasonality: yes
M07: 0.676
M-ADD WALES -------- -------- X-13ARIMA-SEATS run of WALES
automean: not significant.
Automatic model chosen: (0 0 0)(0 1 1)
AICtd: rejected
AICeaster: rejected
Identifiable seasonality: yes
M07: 0.787
M-AUTO UK -------- -------- X-13ARIMA-SEATS run of UK
automean: not significant.
Automatic model chosen: (0 1 1)(0 1 1)
AICtd: rejected
AICeaster: accepted
Identifiable seasonality
Identifiable seasonality: yes
M07: 0.296
16.7 win x-13 diagnostics table
This section contains information about commonly used diagnostics in
Win X-13. This is not a comprehensive list of diagnostics, rather the di-
agnostics that TSAB would frequently look at for determining quality of
seasonal adjustment. All are illustrated from the Win X-13 diagnostics ta-
ble.
Figure 16.1: General tab
Period - the number of observations of the data per year (either 4or 12
datapoints per year)
Transform Whether the data are log transformed or not. The Mode
column indicates whether the series uses multiplicative or additive decom-
position. The ** indicates that this has been automatically selected, using
the function=auto argument in the transform specification
178
16.7 win x-13 diagnostics table 179
Span The length of time the series covers. This can be altered using
the start or span argument in the series specification
Figure 16.2: Model info tab
ARIMA Model the ARIMA model used for the seasonal adjustment.
The ** indicates that this has been selected using the automdl{} specifica-
tion8.
Trading day regressors and t-values for regressors accounting for trad-
ing day effects9.
Holiday regressors and t-values for moving holiday regressors10.
Seasonal Date of break in the series and t-values for testing a seasonal
change of regime11.
User User defined regressors and t-values, such as rmx regressors12.
Coded Outliers Fixed Additive outliers, Temporary changes, and Level
shifts (AO, TC, LS) and their associated t-values. Dependent on the length
of the series, t-values for new outliers should be greater than at least ±2
before these are implemented13.
Auto Outliers Suggested AO, TC, and LS’s and their t-values, if the
outlier specification is used. A manual check on these outliers should oc-
cur before they are implemented as Coded Outliers, as suggested outliers
may not be the most suitable14.
Figure 16.3: Model diagnostics tab
AICC F-adjusted Akaike information criteria (corrected for sample
size). The lower the value the better the model fit.
8see Section 8.4for further information
9see Chapter 9for further information
10 see Chapter 10 for further information
11 see Section 14.4for further information
12 see Section 14.4for further information
13 see Chapter 11 for further information
14 see Chapter 11 for further information
179
180 x-13arima-seats standard output
aa FcE (3yr) absolute forecast error. The absolute error of a 3-year
forecast compared to the latest data. The lower the value the better the
model fit.
Normal indicates whether residuals pass a normality test15.
Sig (Seas) (P)ACF Marks significant peaks in the AFC / PCAF of the
residuals. These can also be identified visually in the ACF and PACF of
the Residuals graphical output. Fewer entries in this indicates less residual
seasonality16.
Figure 16.4: X11 tab
Seasonal MA the length of moving average used in calculating the
seasonal component17.
Trend MA the length of moving average used in calculating the trend
component. The ** indicates that this has been automatically calculated,
and can be fixed using the trendma=5argument in the x11 specification.
Increasing the Trend MA will result in a smoother trend18.
D11F- a p-value for the D11 F statistic for residual seasonality. Values
below 0.05 indicate strong evidence of residual seasonality, which could
be resolved by use of additional regressors, or a different ARIMA model.
M1-M6 values greater than 1often indicate that the outlier treatments
have not been fully resolved19.
M7 the ratio of moving to stable seasonality. Values less than 0.7indi-
cate the series is likely to be seasonal, values greater than 1.3indicate the
series in unlikely to be seasonal20.
M8 M11 values greater than 1often indicate that changes the Sea-
sonal MA or Trend MA would be needed21.
Q A weighted average of the M1-M11 statistics, all of which are forms
of seasonality test. Values less than 0.7indicate the series is likely to be
seasonal, values greater than 1.3indicate the series is unlikely to be sea-
sonal.
15 see Section 23.3for further information
16 see Table 26 for further information
17 see Section 13.4for further information
18 see Section 13.3for further information
19 see Chapter 26 for further information
20 see Section 23.3for further information
21 see Chapter 26 for further information
180
17
GRAPHS AND JAVA GRAPHS
17.1 introduction
When analysing data one of the most basic but powerful tools is to graph
the time series. There are several different methods for producing graph-
ical output, depending on the software used. We primarily focus on the
graphics used in Win X-13 software. This chapter will also show some
graphs produced by X-13-Graph, which is a useful aid in the analysis of a
time-series. X-13-Graph can be used to produce graphical output for users
running the x11 method on MS-DOS, but users of Win X-13 will find it
adds little extra. Full details on how to install and use X-13-Graph can be
found from the website of the U.S. Census Bureau.
X-13ARIMA-SEATS can be run in "graphics mode". This produces graph- Graphics mode
ics metafiles (.gmt files) that contain data for creating a variety of charts.
These files can be read by X-13-Graph (and X-13-Graph Java or other soft-
ware as required). Users of Win X-13 need to tick the “Run in graphics
mode” box and specify a graphical output directory.
Users working from the command line need to use the "-g" flag during
the run of X-13ARIMA-SEATS and supply the name of an existing di-
rectory where X-13ARIMA-SEATS will store the graphics files. For either
case, the full path of the directory needs to be used, remembering that it
must be different from the directory where the output “.out” file is stored.
An example of the command line to run X-13ARIMA-SEATS in graphics
mode is given below:
x13as myspec -g c:13as
This command will create graphics output files for the specification file
“myspec.spc” in the graphics subdirectory. The seasonal adjustment diag-
nostics file and the model diagnostics file produced using the "-g" flag
store only essential information about the seasonal adjustment and model
run needed for the X-13-Graph external graphics procedure.
A description of how to start X-13-Graph in SAS and of the capability
of X-13-Graph can be found from the website of the U.S. Census Bureau.
181
182 graphs and java graphs
17.2 the raw data
Before seasonally adjusting a series, looking at a graph of the original
estimates will enable the user to identify possible problems. For example,
look for:
sudden changes in the general level of the series (trend breaks)
sudden changes in the months in which peaks and troughs occur
(seasonal breaks)
large extreme values - outliers
Figure 17.1: Graph of the original series
Figure 17.1plots an example time series. On first viewing, it can be seen
that the series is seasonal because of the regular seasonal peaks in March.
There are several changes in the level of the series in 2020, indicating the
possibility of a trend break (which could be corrected with a level shifts or
ramps).
17.3 the seasonally adjusted estimates
A graph of the original and seasonally adjusted estimates can show where
breaks or outliers may have affected the series.
Figure 17.2shows a steep fall and then gradual rise in the seasonal
adjustment in 2020 (a likely trend break) and a possible outlier in August
2022. There is an option with Win X-13 output to highlight any span of
data by clicking and dragging the desired span on the graph.
17.4 the seasonal irregular ratios vs the seasonal factors
This type of chart plots the Seasonal Irregular (SI) ratios (de-trended series
found in the D8table of the output) and the seasonal factors (D10) over
182
17.4 the seasonal irregular ratios vs the seasonal factors 183
Figure 17.2: Graph of the seasonally adjusted series
years where the information has been grouped by different periods. See
Figure 17.3for an example.
A moving average is applied to the SI ratios to obtain the estimate of the
seasonal component (which will be removed later by seasonal adjustment).
Both the seasonally adjusted and non seasonally adjusted series are use-
ful for helping decide whether there are any seasonal breaks within the
time series, or whether there is any need to change the seasonal moving
averages for any particular month or quarter. They can also indicate if
there is any one month or quarter with more statistical variability than the
other months or quarters. If the SI ratios are in an approximate straight
line, then the seasonal component should follow this, so a short moving
average is appropriate. If the SI ratios appear to be very erratic, the sea-
sonal factors will try to follow too closely to the SI ratios, producing an
erratic seasonal factor line. In this case a long moving average is appro-
priate. This will remove any unwanted variation in the seasonal without
distorting important patterns in the SI ratios.
X-13ARIMA-SEATS replaces some outliers using an automatic process.
Where there are lots of replaced SI values in a particular month (de-
noted by light blue points) this could be because the month is particularly
volatile. This may indicate evidence of heteroskedasticity or non-constant
variance.
SI ratio graphics can be used for quick visual understanding of the gen-
eral seasonality of a series before proceeding with more thorough analysis.
SI ratios also are a useful guide to the presence of seasonal breaks, shown
as sudden changes to the level of the SI ratios. A seasonal break in the
time series will distort the estimation of the seasonal component. Seasonal
breaks may result in leakage in the variation of one component into the
variation of another. Where the seasonal factor (D10) is much lower than
the SI ratio, some of the seasonality could have been included as part of
the irregular, this may result in residual seasonality in the seasonally ad-
justed series. Where the seasonal factor is much higher than the SI ratio,
183
184 graphs and java graphs
Figure 17.3: Graph of the replaced SI ratios
the seasonal factor could have included too much irregular variation. In
this case, some variation may have been removed from the seasonally ad-
justed series that is not seasonal.
Another useful graph that can be produced in X-13-Graph Java is the
seasonal factors (table D10 in the output) plotted against the mean sea-
sonal factor for each month. Change in seasonality over time can be shown
as a gradual movement in the seasonal factors. Seasonal moving averages
are selected on the basis of the SI ratios, using information from the whole
series.
Where one month or quarter is not being tracked well by the seasonal
factors (it may be more volatile than other months or quarters) the mov-
ing average can be tailored to that month or quarter. For example, in Fig-
ure 17.4, the change in SI ratio in March could be used to show that a
3x7moving average would be more suitable for capturing the changes in
seasonality, when the program originally selected a 3x5moving average
to be applied to all months.
Figure 17.4: Graph of the seasonal factors
Since all the values are on the same scale it can be seen whether any
change in any month is large or small compared with the overall pattern
184
17.5 the spectrum 185
of the series. The overall pattern of the series shown above is one in which
March is the highest month. The I/S ratios (in the D9A table) can be used
in deciding whether distinct moving averages need to be applied to any
one month or quarter.
17.5 the spectrum
The spectrum graph is a useful graphical tool. It can aid the user in estab-
lishing whether a series is seasonal or not. Figure 17.5shows the spectrum
of the prior adjusted data, produced by Win X-13, and the overlaid spec-
tra of the original and seasonally adjusted series, produced by X-13-Graph.
Spectral peaks, occurring at one or more of the seasonal frequencies pro-
vide evidence of seasonality. For example, in Figure 17.5there are spectral
peaks at four of the six seasonal frequencies which indicates strong sea-
sonality (solid line). The seasonally adjusted series can be identified as
non-seasonal because there are no spectral peaks evident (dashed line).
Note for quarterly series, there will be two spectral frequencies ½ and ¼.
Marginally seasonal series can be identified from the graph as they will
have spectral peaks at one or more frequencies (most probably at 1/12).
However, the user should be aware that in some marginally seasonal cases,
the peaks may not be as clearly defined as the ones shown in Figure 17.5.
The X-13ARIMA-SEATS program also produces several crude spectral
graphs at the end of the output file (Table G), but using poor quality char-
acter graphs. Significant seasonal peaks are marked with an "S" and signif-
icant trading day peaks with a "T", with the colour of the letter matching
the colour of the graph(s) which is significant. It is normally preferable to
observe the Win X-13 plots, or X-13-Graph interface for SAS or the Java
equivalent.
17.6 other useful graphs
Two other graphical options of X-13-Graph should be used whilst checking
the quality of the seasonal adjustment. Those options are the Component
Graphs and the Comparison Graphs for Two Adjustments or Two Models.
17.6.1Component graphs
This graphical option gives the possibility to select up to four different sea-
sonal decomposition components to plot (Original Series, Trend, Seasonal
Factors, Irregular). Seasonal Factors and Irregular components cannot be
viewed in Win X-13 graphics, but X-13-Graph plots each component in-
dividually on a graphic output. If several components are selected, they
185
186 graphs and java graphs
Figure 17.5: Graphs of the spectra of prior adjusted series from Win X-13 and X-
13 graph Java
will be plotted in a reduced size on the same screen. An example of this is
given in Figure 17.6.
Figure 17.6: Graphs of the seasonal factors and irregular components
The first of the component graphs shows the seasonal factors (these data
can be found in Table D10). This shows the seasonal pattern and how sea-
sonality evolves. In the above example, it can be clearly seen that March
is always high, December and January are always low, and the seasonal
pattern is quite stable. A more useful representation is the SI chart (Sec-
tion 14.5) The second of the component graphs shows the irregular com-
186
17.6 other useful graphs 187
ponent. The irregular shows the erratic, random part of the series (these
data can be found in Table D13). It is important to use this graph on first
analysis of the series to look for any residual pattern in the irregular which
could harm the quality of seasonal adjustment. A concentration of outliers
in one year may indicate a level shift or seasonal break at that point.
17.6.2Comparison graphs
Comparison Graphs gives the possibility to compare the seasonal adjust-
ment of two different series, or of two different adjustments of the same
series. This cannot be done in Win X-13 graph but can be completed using
the X-13-Graph Java software. Figure 17.7compares two different seasonal
adjustments of the same series (with and without the use of temporary pri-
ors to adjust for the level shifts in 2020 and additive outlier in August 2022).
Using this graphing option, it is possible to compare the smoothness, the
effect on the end of the series of two alternative seasonal adjustment meth-
ods or, as in this case, the effect of a temporary prior adjustment.
Figure 17.7: Graph of the original and comparison of seasonally adjusted series
17.6.3Forecast graph
Forecast graphs show forecast data, and their 95% confidence interval the
end of any series
17.6.4ACF and PACF
Autocorrelation Function (ACF) is the correlation between a time series
with a lagged version of itself. The ACF starts at a lag of 0, which is the
correlation of the time series with itself and therefore results in a corre-
lation of 1. This shows the correlation of the series with the lagged ver-
sion of itself at, in Figure 17.9, up to 24 lags. Partial Autocorrelation Func-
tion (PACF) can be explained using a linear regression where we predict
187
188 graphs and java graphs
Figure 17.8: Graph of the forecast series and confidence intervals
y(t)from y(t1),y(t2), and y(t3). Users of Win X-13 will normally
look at ACF and PACF of the Residuals, and are looking for all lags to be
below the line of statistical significance for a quality seasonal adjustment.
If they are significant, this may indicate residual seasonality.
Figure 17.9: Graph of the ACF and PACF of residual component
188
18
SLIDING SPANS
18.1 introduction
When a series is seasonally adjusted, an important property is stability. A
series is defined to be stable if removing or adding data points at either
end of the series does not overly affect the seasonal adjustment. If it does,
any interpretation of the seasonally adjusted series would be unreliable.
The sliding spans diagnostic is a way of deciding if a seasonal adjustment
is stable.
Stability and quality are linked but are not the same. Most of the time,
the stability of a seasonal adjustment is a good indicator of its quality.
However, it will sometimes be the case that the best seasonal adjustment
is an unreliable one. In this case, the needs of the user will dictate whether
stability or quality of seasonal adjustment is more important.
A span is a range of data between two dates. A span length is the number of data
points within that specific range. Sliding spans in X-13ARIMA-SEATS are a series
of 2,3or 4spans that overlap. For example, a span of data could be from January
2002 to December 2012. It has a span length of 132 months. An example of a span
within this last series is March 2003 to November 2011, which has a span length of
105 months.
Definition
18.2 when to use sliding spans
Sliding spans can be used when there is a need to know how well a sea-
sonal adjustment is performing. Sliding spans analysis is particularly in-
teresting if:
Seasonal breaks, outliers or fast-moving seasonality in the series are
suspected. Often, the Q statistic gives good results for series with
clear seasonal breaks, but the sliding spans statistics will fail. Look-
ing at the graph of original series and seasonally adjusted series will
confirm this
Two options for a seasonal adjustment have to be compared. Sliding
spans can provide diagnostics on which adjustment would produce
the most stable seasonal adjustment estimates. For example, compar-
ing direct and indirect seasonal adjustment. When comparing direct
189
190 sliding spans
and indirect seasonal adjustments, sliding spans statistics are pro-
duced for both methods. The series with the lower stability statistics
is more stable, and therefore likely to be a better adjustment. How-
ever, it is important to make sure the lengths of the sliding spans of
the component series are the same1
When one or two months of a year are unstable, for example a
sales series where November, December and January are particularly
volatile or when there has been a period of instability in the data.
One of the output tables (S3) can be useful for tracing particular
months that are susceptible to producing unstable seasonal factors.
For example, some series (typically in the USA) are very sensitive to
winter temperatures. These series are still seasonal but getting a
stable seasonal adjustment is difficult
For many other different comparisons, such as with or without a trading
day effect2.Figure 18.1illlustration of 4sliding spans, length 7years. In
all cases, the question to ask is if stability, or the best use of available
information and options, is more important to users.
18.3 how sliding spans works
The sliding spans diagnostic works by separately seasonally adjusting
each of 2,3or 4overlapping spans of a time series. Where two or more
sliding spans overlap, the diagnostic compares the different seasonal ad-
justments. The full process is:
1. The program selects a span length, based on the seasonal moving
averages used, the length of the series and whether the data are
monthly or quarterly. The default span lengths are:
6years, if a 3x1seasonal moving average is used
7years, if a 3x3seasonal moving average is used
8years, if a 3x5seasonal moving average is used
11 years, if a 3x9seasonal moving average is used
If the data series is not a whole number of years long, the span length
increases by the part year length. For example, a series running from
January 2002 to March 2013 and using a 3x3seasonal filter would
have spans (7years + 3months) = 87 months long. Note that in this
case:
1see Section 6.3for more information on direct and indirect seasonal adjustment
2see Findley et al. (1990) for more examples
190
18.3 how sliding spans works 191
Figure 18.1: Illustration of 4sliding spans, length 7years
The first span would run between January 2003 and March 2010
The second span would run between January 2004 and March
2011
The third span would run between January 2005 and March
2012
The final span would run between January 2006 and March 2013
(the most recent data point)
If different months or quarters have different seasonal filters, X-13ARIMA-
SEATS uses the longest seasonal filter to set span length
2. The programme sets up a maximum of 4spans. The spans start in 1-
year intervals. So, if the first span starts in Q1 1991, the second span
191
192 sliding spans
would start in Q1 1992. If there is not enough data to create 4spans,
X-13ARIMA-SEATS will produce 2or 3sliding spans. In any case,
all spans start at the beginning of a year (January or Q1) and the last
span includes the most recent data point. If there is not enough data
for X-13ARIMA-SEATS to produce at least 2spans of the preferred
length, the diagnostic is suppressed
3. The programme seasonally adjusts each span separately
4. Where the spans overlap, the programme compares the seasonal fac-
tors and the month-on-month (or quarter-on-quarter) and year-on-
year percentage changes in each span for each data point. This is
shown in Figure 18.1. Note that all the data for each corresponding
date are the same; for example, the Q1 1997 value, 124, is the same
in all four spans. However, as each span is seasonally adjusted in-
dividually, the seasonally adjusted Q1 1997 values will probably be
different. This difference is the basis for sliding spans analysis
5. For each month (or quarter) that is covered by 2or more spans, the
programme works out as follows:
The percentage difference between the largest and smallest sea-
sonal factor (S):
Smax
t=Largest S - Smallest S
Smallest S ·100 (12)
The difference between the greatest and smallest percentage
change in the seasonally adjusted series since the previous month
(or quarter)
MMmax
t= (Largest month-on-month change)
−(Smallest month-on-month change)(13)
QQmax
t= (Largest quarter-on-quarter change)
−(Smallest quarter-on-quarter change)(14)
The difference between the greatest and smallest percentage
change since the same month (or quarter) in the previous year
YYMAX
t= (Largest year-on-year change)
−(Smallest year-on-year change)(15)
In all cases, a value of more than 3% is regarded as unstable.
192
18.4 how to use sliding spans 193
Description Uses
S0Summary of options
S1Period means of seasonal factors
S2Percentage of periods unstable Main output table of sliding spans
S3Breakdown of unstable periods Highlights months and years that are
particularly unstable
S7Full Sliding Spans analysis Gives an idea of the distribution of
unstable months. Also contains SA
spans for analysis.
Table 18.1: The sliding spans output table
6. The program then works out what proportion of data points in the se-
ries, where two or more spans overlap, qualify as unstable for each
statistic given above. These proportions are called S (seasonal fac-
tors), MM (month-on-month change), QQ (quarter-on-quarter change)
and YY (year-on-year change).
18.4 how to use sliding spans
Most of the time, just using the specification slidingspans{} is enough to
use the diagnostic. Normally, the slidingspans spec is included at the bot-
tom of the spec file. A typical example of part of an X-13ARIMA-SEATS
spec file with a sliding spans analysis is:
series{
title="Example of sliding spans spec" start=1996.1 period=4
file="mydata.txt"
}
arima{
model=(0,1,1)(0,1,1)
}
x11{
mode=mult
}
slidingspans{}
18.4.1The output
Table 18.1presents a short description, and some uses for each of the
sliding spans output tables.
Tables S2, S3and S7are produced several times, labelled a) to e):
193
194 sliding spans
Table a) represents seasonal factors
Table b) covers trading days. This table is printed out only if fixmdl
is set to no or clear
Table c) is for the final seasonally adjusted series. This prints out only
if one or more regression variables, such as trading days or an Easter
effect, are included in the model and are not fixed
Table d) is for the month-to-month or quarter-to-quarter changes
Table e) is for year-on-year changes. In table S2guideline percentages
are produced only for seasonal factors, month-on-month (or quarter-
on-quarter) and year-on-year changes. Looking at the values of, in
particular, S and MM (or QQ if quarterly data) of table S2gives
an idea as to how good the adjustment is. The guidelines given in
Findley et al. (1990) for interpreting S, MM (or QQ) and YY are:
For S, series with stable seasonal adjustments usually have S<15%.
Series with S>25% almost never have good seasonal adjustments.
Those for which S falls between 15% and 25% should cause
concern but may give acceptable seasonal adjustments. Contact
TSAB. for further guidance
Series for which MM>40% (QQ>40% for quarterly data) should
not be seasonally adjusted. Those for which MM (QQ) falls be-
tween 35% and 40% should cause concern but may give accept-
able seasonal adjustments. Contact TSAB for further guidance
YY<2% is common with good series. While there is no recom-
mended upper limit for YY above which a series should not be
seasonally adjusted, YY=10% is quite high. However, most se-
ries with high YY values also have poor results for S or MM, so
the YY statistic is of less importance
These guidelines are summarised under table S2in the X-13ARIMA-
SEATS output, when sliding spans is run. The output of tables S3can be
particularly useful in tracking down areas of instability. It is not automat-
ically printed with the print = brief option, so the default or print = all
should be used when a single series is being analysed in more detail.
18.4.2Sliding spans options
It is not necessary to specify any of the available options to use sliding
spans. However, some of the options (such as length, print and outlier)
can allow the user to be able to apply the sliding spans diagnostic in the
194
18.4 how to use sliding spans 195
widest range of situations.
The span length is of prime importance, since it can affect the perfor- Length of spans
mance of the sliding spans diagnostics, especially if fewer than 4spans
are created. The length argument allows the user to select the number of
data points included in the spans and used to generate output for compar-
isons. The length argument is needed:
If the length of the series is not a whole number of years. This will
bring all the span lengths into line with the longest span used
To run an indirect seasonal adjustment if different seasonal moving
averages are used for the component series. In this case, the span
lengths for each series will be incompatible. For example, a compos-
ite series of total employment is made up of monthly total male and
female employment seasonally adjusted series. The adjustment for
the male series uses a 3x5seasonal moving average, while the adjust-
ment for the female series uses a 3x3seasonal filter. The two series
will use different span lengths, so we need to change the span length.
We would use the command length = 96 in the spec file for adjust-
ing the series for female series to produce sliding spans diagnostics
comparable to those from the male series
In these situations, the guide percentages given by Findley et al. (1990)
(Findley, et al. 1990), become too high and cannot be reliably used. How-
ever, the results can still be used to say something useful about the adjust-
ment.
When the slidingspans spec is included in the analysis of a series, users
have to take into account that:
Longer span lengths lead to a smaller proportion of unstable months.
Therefore, using longer spans will, if anything, bias the stability
statistics downwards. Therefore, any sliding spans statistics which
are higher than the guideline percentages are still more unstable than
is desirable
When two or three spans are produced, the program will say that
the guideline percentages are now too high and should be lowered.
If the values of S and MM (or QQ) are too high when fewer than four
spans are produced, the series is still unstable
In both these cases, there is a chance that a series may not be classi-
fied as unstable, when in fact it is. This is because the series would have
been close to being classified as unstable under the guideline percentages,
and either the length or number of spans has been changed. As it is not
known how much to change the guideline percentages by, it cannot be said
195
196 sliding spans
for sure whether the series is stable or unstable. Nevertheless, the benefits
gained by using sliding spans in a large number of cases outweigh this
disadvantage.
There are two other important options that can be useful in the slidingOther important
options in the
sliding spans
analysis
spans analysis:
The argument print = all allows you to view the full sliding spans
output, which can be a useful additional source of information when
analysing a series in more detail. However, the default output is usu-
ally enough
If there are a lot of outliers in the data, it is recommended to use
the command outlier = keep to allow the sliding spans analysis to
use them. This may improve the stability statistics (see below) and
provide further evidence for including them in the adjustment.
18.4.3When sliding spans will not work
There are several situations in which Sliding Spans will either not work
or produce output that is not useful in assessing the stability of the data.
They are:
1. When an additive seasonal adjustment is selected. Sliding spans will
not produce tables S1and S2in this case, and the remaining output
should not be used in the same way as for multiplicative adjustments
2. If the series is too short for X-13ARIMA-SEATS to construct at least 2
spans, X-13ARIMA-SEATS will not carry out the sliding spans anal-
ysis and display an error message. However, the rest of the seasonal
adjustment will be carried out
3. If X-13ARIMA-SEATS produces fewer than four spans, it will rec-
ommend that the threshold values of S, MM (or QQ) and YY be
lowered3
4. When all the seasonal factors are close to 100. In this case, the thresh-
old value of 3% is too large, and no S2table will be produced. This is
quite common, and unfortunately renders the sliding spans diagnos-
tic useless when it happens. (Findley and Monsell 1986) have carried
out a study as to how the threshold values should be lowered, but
found no correlation between appropriate threshold values and the
size of the seasonal movements4
3see Section 18.4.2.1for more details
4see section 6.2of the X-13ARIMA-SEATS manual (USCB 2017)
196
18.5 summary 197
5. If adjusting a composite series indirectly, and the span lengths of
the component series are different, a period in each span will have
unrealistic seasonal factors. In this case, using the length argument
as detailed earlier to even up the span lengths will produce more
accurate seasonal factors. However, care must still be taken when
interpreting the stability statistics5.
18.5 summary
The sliding spans diagnostic is one of the more useful statistics in the X-
13ARIMA-SEATS output to look at. The sliding spans diagnostic measures
the stability of a seasonal adjustment, which is related to quality but not
necessarily the same thing.
A series that fails sliding spans is likely to have a seasonal break or a
period of instability. Sliding spans is particularly useful in these situations,
as the M and Q statistics can misleadingly suggest the seasonal adjustment
is good. Sliding spans can also be used to compare different methods of
seasonal adjustment and give an indication of which option leads to a
more stable adjusted series.
5see Section 18.4.2for more details
197
19
HISTORY DIAGNOSTICS
19.1 introduction
Revisions history is one of the stability diagnostics available in X-13ARIMA-
SEATS. It considers the revision of continuous seasonal adjustment over a
period of years and is, therefore, a way of seeing how a time series is af-
fected when new data points are introduced. The basic revision calculated
by X-13ARIMA-SEATS, to enable visualisation of these effects, is the dif-
ference between the earliest seasonally adjusted estimate for given month
(obtained when that month is the latest month in the series) and the most
recent adjustment based on all future data available at the time of the
diagnostic analysis.
When a new data point becomes available for a series, more is learnt
about the behaviour of that series; this is especially true of seasonal series.
With that new data point, more is found out about the seasonal pattern,
as well as the underlying trend. However, when the series is updated with
the extra information, the use of this extra information creates revisions
to the seasonally adjusted series. Generally, users want to minimise the
number and size of these revisions. The importance of this is a question
for the user. Some users prefer to have the most up to date figures possible,
regardless of the size of revisions. Other users prefer limited revisions, to
make the data they work with more consistent. The choice of revision
policy is also influenced by the nature of the data.
The revisions history diagnostic is a way of seeing how a time series is
affected when new data points are introduced. Obviously, it is not possible
to predict the future so instead, the diagnostic works by taking a period of
existing data and adding the data points one by one as if they were new
observations. This creates revisions in the data, which is what users are
interested in.
19.2 when to use revisions history
The diagnostic is most often used when there are two competing methods
for seasonally adjusting a series, both of which are acceptable in terms of
other diagnostics, for example the Q statistics.
For example,
Use of two different ARIMA models
199
200 history diagnostics
Use of different seasonal moving averages
Choosing between direct and indirect seasonal adjustment of a com-
posite series
To compare how prone two different adjustments are to revisions, the
history diagnostic can be run on both series and then the revisions pro-
duced over the test period can be compared. In general, smaller revisions
are better. An adjustment with small average annual revisions will be more
reliable than an adjustment with larger revisions. Unlike some other di-
agnostics such as the Q statistic and sliding spans, there is no objective
measure for accepting a revision.
There are eight different variables that X-13ARIMA-SEATS can produce
a history for, and many of these tables can be used in more than one
way. Any full explanation of the diagnostics and options available would
be long and unwieldy. Therefore, this chapter will concentrate on three
functions of the history diagnostic;
1. Using the revisions history to compare two competing adjustments
2. Comparing revisions in direct and indirect seasonal adjustments
3. Using AICC histories to choose between two adjustments
Therefore, the revisions history diagnostic is one of the later tests to
apply to a series.
19.3 how the revisions history diagnostic works
The process by which the diagnostic works is:
1. The start date of the history diagnostics is chosen. This can either be
the default X-13ARIMA-SEATS choice, or it can be specified by the
user with the start argument
2. The program seasonally adjusts the series, up to and including the
start point of the revisions history
3. X-13ARIMA-SEATS then seasonally adjusts the whole series again,
but up to the observation after the revisions history start date. The
program repeats this process, including one extra data point in each
run until all the data have been added and the entire series has been
adjusted
4. The final seasonal adjustment, which covers all the data, is the most
recent adjustment available and represents the best estimate of the
seasonal factors
200
19.4 how to use revisions history?201
5. The program calculates the percentage difference between the first
seasonal adjustment of the starting point (calculated in step 2) and
the final adjustment for the same month (as in step 4). The program
repeats this for every data point up to, but not including, the final
data point in the series. This is because the value in steps 2and
4will be identical. The program also calculates any other histories
specified by the user
6. The program then produces the appropriate tables for the series.
19.4 how to use revisions history?
The history specification can be used with different sets of arguments and
the choice of the arguments depends on the scope of the revision analysis.
An example of part of an X-13ARIMA-SEATS spec file with a revisions
history analysis is:
series{
title="Example of sliding spans spec"
start=1996.1
period=4
file="NZJW.txt"
}
arima{
model=(0,1,1)(0,1,1)
}
x11{
mode=mult
seasonalma=s3x3
trendma=5
}
history{
start=1999.1
sadjlags=(1,2)
}
slidingspans{}
19.4.1Comparing two competing adjustments
This is the simplest use of the revisions history diagnostic. It is used to
produce just table R1, which gives the revision between the first and final
201
202 history diagnostics
estimates of the seasonally adjusted series. The idea of this diagnostic is
to compare the stability of two competing adjustments when new data are
introduced.
In the example spec file in Section 19.4, the program is being run on the
series NZJW, which is from the Motor Vehicle Production Index data set.
In this spec file, two options have been included within the history speci-
fication. The start argument determines the start date of the series. Users
are most interested in how the seasonal adjustment performs with current
data, rather than data that is several years old. It is recommended that the
start argument be used to limit the length of the history diagnostic to the
last couple of years. If the start argument is not used, X-13ARIMA-SEATS
will select the start date see section 7.8of the X-13ARIMA-SEATS refer-
ence manual (USCB 2017)to see how the program does this.
The other argument used in the history specification above is sadjlags.
This argument allows the user to choose up to 5lags to be covered in the
revisions history. These revisions compare the estimate of a given time
point when n points are available after the point of interest to the final
estimate (final by default can be changed to concurrent). For example, a
lag of n compares the estimate of time point t when data up to (t+n) are
available with the final estimate when the full span is used. Table R1from
the output obtained when this spec file was run on the series NZJW is
provided below.
R 1 Percent revisions of the concurrent seasonal adjustments
From 1999.1 to 2000.2
Observations 6
Date Conc - 1 later- 2 later-
Final Final Final
---- ------ ------ ------
1999
1st 0.89 -2.08 -2.27
2nd -9.11 -2.88 -1.77
3rd 4.00 3.13 2.61
4th 1.08 -0.25 -0.52
2000
1st -1.00 -1.03 *****
2nd -2.55 ***** *****
In this case, the data are quarterly and the final adjustment (with all
the data up to Q3 2000 available) is the target. The first column is the
202
19.4 how to use revisions history?203
revisions history of the initial adjustment. It is the percentage difference
between the first vintage (including all the data up to the point in ques-
tion in the adjustment) and the final vintage (including all the data in the
series). Although it is possible to do it with concurrent being the target, it
is considered here from first to final vintage.
For example, the value 1.08 (shown in bold) has been calculated by work-
ing out the percentage difference between the seasonally adjusted value
for Q4 1999 given all the data, and the value for Q4 1999 given the data up
to Q4 1999. In other words, it is the percentage difference between the Q3
2000 vintage (the final vintage) and the Q4 1999 vintage (the first vintage)
of Q4 1999. The next column is the revision at lag 1(this is stated in the
output in table R0). In this case, the value for Q4 1999 is -0.25. This has
been calculated by working out the percentage difference between the sea-
sonally adjusted value for Q4 1999 given all the data, and the value for Q4
1999 given the data up to and including Q1 2000. This is the percentage
difference between the final vintage and the Q1 2000 vintage (the second
vintage) of Q4 1999.
The final column is the revisions at lag 2. This is the percentage dif-
ference between the final vintage and the third vintage. For example, in
table R1, the figure in italics (-0.52) has been calculated by working out
the percentage difference between the seasonally adjusted value for Q4
1999 given all the data (up to Q3 2000), and the value for Q4 1999 given
the data up to and including Q2 2000. In this example, the seasonally ad-
justed value for Q4 1999 given the data up to Q3 2000 is 0.52% smaller
than the seasonally adjusted value for Q4 1999 given the data up to and
including Q2 2000.
Why are the revisions at various lags of interest? They give some idea
as to the size of revisions at each lag, which can say a lot about the data.
For example, the relative sizes of the revisions at each lag give you some
information as to how quickly adjusted data converge to its final values.
This information can be used to inform decisions on a revision policy for
the series. Up to five lags at a time can be specified, using the sadjlags ar-
gument. The diagnostic also prints out the summary table, shown below.
R 1.S Summary statistics: average absolute percent revisions of the
seasonal adjustments
Quarters:
1st 0.95 1.55 2.27
2nd 5.83 2.88 1.77
3rd 4.00 3.13 2.61
4th 1.08 0.25 0.52
203
204 history diagnostics
Years:
1999 3.77 2.08 1.79
2000 1.78 1.03 ****
Total: 3.11 1.87 1.79
Hinge Values:
Min 0.89 0.25 0.52
25% 1.00 1.03 1.14
Med 1.82 2.08 2.02
75% 4.00 2.88 2.44
Max 9.11 3.13 2.61
Of these statistics, the most useful value is the total revision. This is
the average absolute percentage revision from the first (or second, third. . .
etc, depending on the sadjlags option used) seasonal adjustment, and the
adjustment using all the data available. This is a single figure that can
be used to compare the quality of competing adjustments. These total
revision values have been calculated by taking the mean of the absolute
values of the entries of the corresponding column in table R1. For example,
the Total Revisions Value in table R1S for the first column (two decimal
places) is equal to:
3.11 =0.89 +9.11 +4.00 +1.08 +1.00 +2.55
6(16)
The other values can be useful too. Users will be more interested in re-
cent data. Therefore, the size of revisions with recent data may be more
important in deciding which adjustment to use than earlier years. This
diagnostic could be used to compare revisions performance of compet-
ing adjustments. An example would be to check the revisions caused by
different ARIMA models of the series NZJW. To do this, run the series
repeatedly through X-13ARIMA-SEATS, once for each ARIMA model be-
ing compared. No other options should be changed. The total revisions
values using different ARIMA models to adjust NZJW are presented in
Table 19.1.
204
19.4 how to use revisions history?205
Model Average absolute revision percentage
First estimate At lag 1At lag 2
Log(011)(011)3.11 1.87 1.79
Log(012)(011)3.11 1.92 1.90
Log(210)(011)3.17 1.91 1.89
Log(022)(011)3.11 1.86 1.79
Log(212)(011)3.20 1.83 1.81
Table 19.1: Revisions history
Table 19.1shows that changing the ARIMA model used does not have a
very large effect on the size of revisions. The first and fourth model have
the lowest revisions for the first estimate, and in practice a (011)(011)
model would probably be selected as it uses the fewest parameters.
Other Options
Tables R2, R4and R5are all similar to table R1, but refer to slightly dif-
ferent target variables. The table below summarises the target variables
available, and the commands needed to produce each variable.
Number Command Details
R1Sadj Final seasonally adjusted series (the
default)
R2Sadjchng Period to period changes in final sea-
sonally adjusted series
R3Trend Final Henderson trend component1
R4Trendchng Period to period changes in Hender-
son trend component
Table 19.2: Other options
The variables of interest can be specified in the estimates argument. The
following history spec provides revisions to trend and monthly changes
in the trend at lags 1,2,3and 12:
history{
start=1998.1
estimates=(trend trendchng)
trendlags=(1,2,3,12)
}
205
206 history diagnostics
Full details of all arguments can be found in section 7.8of the X-13ARIMA-
SEATS manual (USCB 2017). More complicated growth rates, such as the
change of most recent 3months on previous 3months (for example, Apr-
May-Jun compared with Jan-Feb-Mar) need a different approach. See Chap-
ter 7for information regarding revision triangles and details on how to
construct revision histories manually for this purpose.
19.4.2Comparing direct and indirect seasonal adjustment
Revisions history is useful in comparing the revisions performance of di-
rect and indirect seasonal adjustments. Table R3is produced when run-
ning a composite seasonal adjustment. This table provides revisions ob-
tained by adjusting all the components individually, as if indirect seasonal
adjustment had been performed. In the same output, Table R1gives the
revisions for the direct seasonally adjusted series. Other than setting up
the composite adjustment (covered in Chapter 20) and including the his-
tory spec in the individual component series, no other changes to the spec
files are needed.
As an example, here are the summary tables produced when the series
GMAC, GMAD and GMAE, overseas visitors to the UK (from different
locations), are run both directly and indirectly:
R 1.S Summary statistics: average absolute percent revisions of the
seasonal adjustments
Years:
1999 0.73
2000 0.50
Total: 0.65
R 3.S Summary statistics: average absolute percent revisions of the
concurrent indirect seasonal adjustments
Years:
1999 1.06
2000 0.67
Total: 0.92
The tables above show that since 1999, the indirect adjustment has pro-
duced greater revisions than the direct adjustment. This might not be a
problem, and the indirect adjustment may have other virtues, for example,
it is more stable under sliding spans. While the direct adjustment is better
than the indirect in terms of the size of revisions, the table shows how big
the difference is and allows it to be set against any perceived advantages
of indirect adjustment.
206
19.4 how to use revisions history?207
19.4.3Using AICC history to choose between two adjustments
Table R7provides a history of the model’s AIC values over the period
of the history. Unlike the other tables discusses so far, this is not a revi-
sions history. It is a history of the AICC values calculated when fitting the
model. Lower AICC values indicate a better model fit. The AICC history
is a useful and flexible way to choose between two different models for
seasonal adjustment.
R 7. Likelihood statistics from estimating regARIMA model over spans
with ending dates 1:1996 to 3:2000
Span End Log Likelihood AICC
-------- -------------- -------
1999.1 -337.006 676.100
1999.2 -345.626 693.338
1999.3 -358.060 718.205
1999.4 -364.566 731.214
2000.1 -371.809 745.700
2000.2 -378.743 759.565
2000.3 -386.011 774.101
This is an example AICC history for the example series used above. The
method is to produce two AICC histories, for two competing methods
of seasonal adjustment and then calculate for each point in the history,
the difference between the first and second model’s AICC values, includ-
ing any corrections you may need to apply. For example, when choosing
between an additive or multiplicative decomposition model, X-13ARIMA-
SEATS penalises the additive model by adding 2to its AICC value, be-
fore comparing it against the multiplicative adjustment’s AICC value. As
stated earlier, a small AICC value is more desirable.
The following example uses a monthly series showing the number of
men claiming Job Seekers’ Allowance, as of the second Thursday in the
month. There is an issue as to whether this series is best modelled with an
additive or a multiplicative model. Therefore, looking at the AICC histo-
ries of both models might be useful. The history specification of the spec
file required to run this diagnostic is:
history{
start=1999.1
estimates=aic
save=lkh}
207
208 history diagnostics
Span end date AICC(mult.
Model)
AICC
(add.
model)
Difference Model
choice
Jan 1999 2174 2166 8 Additive
Apr 1999 2241 2230 11 Additive
Jul 1999 2307 2292 15 Additive
Oct 1999 2372 2354 18 Additive
Jan 2000 2438 2421 17 Additive
Apr 2000 2504 2488 16 Additive
Jul 2000 2569 2549 20 Additive
Oct 2000 2635 2613 22 Additive
Nov 2000 2657 2633 24 Additive
Dec 2000 2678 2654 24 Additive
Table 19.3: Selected values from table R7
The option estimates = aic is used to produces the AICC history. The
option save = lkh means that the AICC history will be saved as a separate
file, with extension “.lkh”.
Table 19.3provides a selection of values from Table R7when the series is
adjusted using an additive and a multiplicative decomposition. Using the
default bias of 2, the additive model is preferred if AICC (multiplicative) -
AICC (additive) > 2. Table 19.3shows that the choice of an additive model
is stable. Throughout the last two years, X-13ARIMA-SEATS would have
chosen an additive model in any month, even though the additive model
is penalised in the model selection process2.
19.5 when revisions history will not work
The Revisions history diagnostic needs a minimum of 5years of data to
work. This is because it needs 5years of reference data to make a reason-
able series of seasonal adjustments during the revisions history.
If there are less than 5years of data, X-13ARIMA-SEATS will fail to run.
If the start argument is used to specify a date that is less than 5years from
the beginning of the series, X-13ARIMA-SEATS will run. However, it will
move the start date of the revisions history to 5years after the series start
date.
In some cases, the revisions history of an additive seasonal adjustment
can be difficult to interpret. If an additive series has just positive or just
negative seasonally adjusted values, the revisions in table R1are calcu-
lated in just the same way as for a multiplicative seasonal adjustment.
However, if a series has both positive and negative values, then the differ-
2a further example can be found in Section 4.4of Findley et al. (1998)
208
19.6 summary 209
ence, rather than the percentage revision, is calculated. For example,
R 1 Revisions of the concurrent seasonal adjustments
From 2000.Jan to 2001.May
Observations 17
2001
Jan -53.96
Feb 33.89
Mar 13.27
Apr 22.06
May 25.18
Most other variables are not affected by this effect. Details of which
other variables are affected and how are given in (USCB, 2013).
19.6 summary
The revisions history diagnostic is most useful when comparing two meth-
ods for seasonal adjustment that are both acceptable in terms of M and Q
statistics, sliding spans and other diagnostics. There is no absolute mea-
sure of what an acceptable level of revisions is, so the diagnostic is of
limited use on a single series. There are several histories available, all of
which can be useful in observing the performance of the seasonal adjust-
ment. Of these, those in tables R1and R3are probably most useful. If
month-to-month changes, the trend component, or the month-to-month
trend changes are of interest. Tables R2, R4and R5respectively will also
be worth looking at.
Table R7is quite easy to use to compare two competing models for
a series, such as two ARIMA models or two different prior adjustments.
This chapter has introduced a basic use of the history spec; there are other
tables that can be produced, details of which can be found in USCB (2013).
209
20
COMPOSITE SPEC
20.1 introduction
The composite spec is used as part of the procedure for obtaining both
direct and indirect adjustment of a composite series. See Chapter 6for
further details. This chapter describes the spec files of the composite series
and of the components and how to run the seasonal adjustment.
Section 20.2will describe how the composite spec can be used in X-
13ARIMA-SEATS to compare the performance of direct and indirect sea-
sonal adjustments. Section 20.3will discuss the diagnostics that are pro-
duced and how these can be used to inform the best method of seasonally
adjusting an aggregate series, also known as composite series. (An aggre-
gate series is one which may be thought of as consisting of values at each
point in time which can be obtained by summing the corresponding val-
ues of two or more series for example unemployment in any month is
the sum of male and female unemployment).
20.2 the spec files
Running a composite seasonal adjustment (both direct and indirect) re-
quires spec files for the component series (one spec for each series), a spec
file for the aggregate series, and a metafile that contains the names of all
the component series that form the aggregate series and the name of the
aggregate series itself.
The individual spec files must define how they are combined to form the
aggregate, using the comptype and the compwt arguments in the series
spec. The comptype argument specifies whether that particular compo-
nent is added, subtracted, multiplied or divided. The compwt argument
specifies the size of the constant used to multiply that particular compo-
nent before it is combined to form the aggregate series (this constant is
the weight of the component series). If no compwt is specified, then the
default weight is 1.
A composite adjustment run produces an indirect seasonal adjustment
of the composite series as well as a direct seasonal adjustment. The indirect
seasonal adjustment is the weighted aggregate of the seasonally adjusted
component series specified by the comptype and comwt arguments. If one
of the component series is not seasonal then specifying the summary mea-
sures option by setting type=summary in the x11 spec of that component
211
212 composite spec
will include the component in the indirect adjustment without seasonally
adjusting that particular series. A sliding span or revisions history analy-
sis1of the direct and indirect adjustments can be obtained but the options
must be specified in each of the component series as well as the composite
series.
When a composite series is adjusted using X-13ARIMA-SEATS the out-
puts are:
A direct seasonal adjustment of the aggregate, with normal output
An indirect adjustment of the aggregate found by combining the
seasonal adjustment of the components, with an output that includes
the D-tables onwards only
Diagnostics comparing the smoothness of the direct and indirect ad-
justments of the aggregate series.
20.2.1Example
The following example illustrates all the steps of a composite adjustment.
The series with file names “enjq.txt” and “enjl.txt” are two component
series that sum to an aggregate series called “trade”. For example, use of
“comptype=add” will sum the component series into the composite series.
Step 1: Create a spec file for each of the component series, eg:
ENJQ.SPC
series{
title="Food & Beverages Imports CP"
file="enjq.txt"
name="enjq"
comptype=add
}
x11{}
A spec file for a component series that is not seasonally adjusted is given
below.
ENJL.SPC
series{
title="Crude Oil Imports CP"
file="enjl.txt"
name="enjl"
comptype=add
1see Chapter 18 and Chapter 19
212
20.3 comparing adjustment using x-13arima-seats diagnostics 213
}
x11{
type=summary
}
The two spec files specify that ENJQ and ENJL are summed to form an
aggregate series. ENJQ will be seasonally adjusted. ENJL is not seasonally
adjusted.
Step 2: Create a spec file for the composite series:
TRADE.SPC
Composite{
title="Total Imports CP" name="Trade"
}
x11{}
Step 3: Create a metafile with details of the component and composite series. The
metafile saved as imports.mta is shown below:
Enjq
Enjl
Trade
NB the spec file for the composite series must be listed last.
20.3 comparing adjustment using x-13arima-seats diagnos-
tics
For series with several layers within aggregation structures, the compos-
ite adjustment spec provides a powerful tool to decide what the optimal
level of seasonal adjustment is. The following are some criteria to help
choose between the direct and indirect approach and may be put in order
of priority as follows:
20.3.1Residual seasonality in the seasonally adjusted series
The estimated seasonally adjusted series should not have any statistically
significant residual seasonality. X-13ARIMA-SEATS provides a set of spec-
tral diagnostics which could be used as a quick check for the existence
of significant seasonal peaks in one of the estimated spectra. Note that
if a warning message for significant seasonal peaks is printed out while
213
214 composite spec
running the composite spec file, then it refers to the direct seasonal ad-
justment of the composite series. To check whether there are significant
peaks in the indirect seasonally adjusted series2, the spectral plots in the
output should be examined. To be visually significant, the spectral peak
at a seasonal frequency must exceed both of its neighbours by at least 6
stars. If there are any significant peaks in one of the two options, then the
alternative approach should be chosen.
20.3.2Revision errors
X-13ARIMA-SEATS produces a set of revisions history diagnostics3. In
general, the preferred alternative is the one that minimises the average
percentage of revisions in the seasonally adjusted series.
20.3.3Stability
X-13ARIMA-SEATS produces a set of sliding span diagnostics4as a way
of deciding if a seasonal adjustment is stable. In general, the preferred al-
ternative is the one that produces a more stable seasonally adjusted series.
20.3.4Interpretability of seasonally adjusted series
The M-statistics measure various areas in the quality of seasonal adjust-
ment while the Q statistic is a weighted average of all M-statistics. If the Q
statistic fails (is greater than 1), there might be problems interpreting short-
term movements in the seasonally adjusted series. In general, the chosen
approach should minimise the Q statistic. Note however that the US Cen-
sus Bureau have found evidence that, in an indirect analysis, some of the
statistics, namely, M8to M11 are misleadingly high. If it appears that the
indirect Q statistic is unduly high mainly because of these statistics, it may
be justifiable to give less weight to this fact.
20.3.5Smoothess of seasonally adjusted series
The choice between direct and indirect methods is based on the compari-
son between the roughness measures, computed for the two series derived
under the two different approaches. In general, the method of adjustment
which gives the smoother series should be used. The measure of rough-
ness is given at the end of the output (for the aggregate series), or before
2see an example in Figure 17.5
3see Chapter 19
4see Chapter 18
214
20.3 comparing adjustment using x-13arima-seats diagnostics 215
the sliding spans and history diagnostics if these have been activated. The
following is an example of roughness measures.
The measures of roughness describe the size of the deviations from a
smooth trend of the adjusted series (with R1and R2using different meth-
ods of trend estimation). The test results reported above suggest that the
direct seasonal adjustment is smoother than the indirect adjustment. How-
ever, it should be noted that smoothness is not necessarily the most desir-
able characteristic of a seasonally adjusted series.
215
21
FORECASTING
21.1 introduction
Forecasting techniques are used extensively in National Accounts to ex-
tend series beyond the most recent period for which data are available
. This document describes the options to use for forecasting in seasonal
adjustment and how to use X-13ARIMA-SEATS to forecast series for a
purpose different from seasonal adjustment. This chapter is intended to
be a reference document to allow users to make sound decisions with-
out needing to understand the forecasting procedure in depth, although
a more technical section, which explains the regARIMA method in more
detail, can be found in Chapter 9.
21.2 forecasting in seasonal adjustment
The regARIMA part of the X-13ARIMA-SEATS program enables time se-
ries to be modelled to extend the series forwards (adding forecasts) and
backwards (adding backcasts), to estimate calendar effects and to enable
the series to be adjusted for unusual and disruptive features such as out-
liers or breaks.
Chapter 9described the regARIMA method used in X-13ARIMA-SEATS
and explained the options available to fit a model before the seasonal ad-
justment itself is performed. This section will revisit regARIMA models
and provide details on the method to use to forecast series for seasonal
adjustment purposes. Section 21.3will deal with the problem of model
selection for forecasting series for a purpose different from seasonal ad-
justment.
When fitting ARIMA models using X-13ARIMA-SEATS, there are deci-
sions that need to be made by the user, for example whether to specify an
ARIMA model or use automatic model detection. Related to this, the fore-
cast horizon should be taken into account for the forecasts and backcasts
whose generation is one of the main purposes of modelling. The default
horizon for forecasts, if none is specified, is one year (the default for back-
casts is none). Thus, the standard approach envisaged by the designers of
X-13ARIMA-SEATS is to use the model selected by automdl with a year
of forecasts.
Extensive empirical analysis of ONS data has shown that performances
of pickmdl and automdl are very similar. In fact, using pickmdlmethod=first,
217
218 forecasting
with the list of models (reported in Chapter 8,Section 8.4.2) and one year
of forecasts will result in a substantial reduction of revisions compared
with no forecasts at all typically the mean absolute revision is reduced
by 10-%. If the recommended method fails to select a model, the appropri-
ate alternative forecasting method should be adopted, as highlighted in
Table 21.1.
Series Length Recommended Method
<6years automdl maxorder = (2,1) no constant
6-10 years automdl maxorder = (3,1) no constant
10-12 years Monthly series: automdl maxorder = (4,1)
no constant
Quarterly series: automdl maxorder = (3,1)
no constant
>12 years automdl maxorder = (4,2) constant
Table 21.1: Appropriate modelling method for forecasting
The Table 21.1shows the recommended method for forecasting monthly
and quarterly series. The maxorder parameter specifies the maximum or-
der of regular and seasonal ARMA polynomials that could be chosen by
automdl.
For monthly series with more than 12 years of data available the alter-
native method allows us to test the significance of a constant term in the
model. Particular attention should be paid when interpreting the results.
In fact, a significant constant should be maintained only if the selected
model does not present regular differencing (the model picked is of the
type (p 0q)(P D Q) ). This is because when regular differencing (d=0)
is selected in the model, the constant term corresponds to an exogenous
trend, which is not so common in real life series. On the contrary without
regular differencing in the model the constant term would refer just to the
mean of the series, useful to set the long-term behaviour of the series.
Once a model has been selected, it should be specified in the arima spec
in the following way:
arima{
model=(p d q)(P D Q)
}
where p, d, q are the orders of the regular part of the model and P, D, Q
are the orders of the seasonal part. The arima specification should be used
for the production runs of the forthcoming year. The form of the model
should be re-estimated once a year during the seasonal adjustment review
process.
218
21.3 forecasting for a purpose different from seasonal adjustment 219
Finally, it must be emphasised that if the model used describes the series
poorly, then the forecasts and backcasts that are generated are also of poor
quality. However, for seasonal adjustment purposes, the gain in using the
forecasts is greater than using asymmetric weights in the moving average
calculation. Therefore if the automdl fails to select a model, a simple model
(generally (011)(011)) should be fixed in the arima spec so that forecasts
can be used in the calculation of the moving averages.
Once the model is decided, the forecast spec can be added:
forecast{
maxlead=12
}
where maxlead specifies the number of forecasts. Conventionally, maxlead=12
is used for monthly data, maxlead=4for quarterly data, and maxlead=1
for annual data, all of which will produce one year of forecast. However,
maxlead can be set to any value up to 120
21.3 forecasting for a purpose different from seasonal ad-
justment
When forecasting for purposes other than seasonal adjustment (for exam-
ple some sections of a statistical bulletin are of insufficient timeliness, and
must be forecasted), then less concern can be given to the stability of the
series. The regARIMA part of the X-13ARIMA-SEATS program can also
be used for this aim to extend the series forwards (adding forecasts) and
backwards (adding backcasts). Depending on the nature of the forecasting
problem, then forecast evaluation may require other considerations.
21.3.1Model selection to generate forecasts
There are two criteria to select an ARIMA model with X-13ARIMA-SEATS
to generate forecasts:
1. Manual model selection using autocorrelation and partial autocorre-
lation functions
2. Automatic model selection
The model selection criteria depend on the length of the series. In fact:
If less than 3years of data are available, other methods of forecasting
should be used (for example simple extrapolation methods). At least
3years of data are required for X-13ARIMA-SEATS to operate
219
220 forecasting
If 3-5years of data are available, X-13ARIMA-SEATS can use ARIMA
modelling or provide trading day and Easter adjustments, but they
are generally of very poor quality and subject to large revisions as
future observations become known. At least 5years of data are re-
quired for any automatic model selection to operate. In this case,
users could undertake manual model identification from scratch to
identify the model to generate forecasts
If more than 5years of data are available, X-13ARIMA-SEATS can
use automatic model selection and provide good estimates for trad-
ing day and Easter adjustments
The program can produce the necessary autocorrelation outputs, andIdentifying a model
manually to
generate forecasts there are textbooks that describe the procedure, but it requires consider-
able experience to produce reliable results. In fact, the process of manual
refinement needs a degree of skill and care and advice should be sought if
in any doubt. The program provides a number of diagnostics that are help-
ful in this process particularly the model identification statistics (AICC,
BIC etc.). Details of the use of these may be found in the full X-13ARIMA-
SEATS documentation.
Once the appropriate model has been found, it should be specified in
the arima spec in the following way:
arima{
model=(p d q)(P D Q)
}
where p, d, q are the orders of the regular part of the model and P, D,
Q are the orders of the seasonal part. In common with other X-13ARIMA-
SEATS specs, the commas in the inner brackets may be omitted provided
the figures are separated by spaces. The other possible arguments of arima
are concerned with pre-specifying parameter values and should not gen-
erally be used.
Another approach to X-13ARIMA-SEATS can be used if only 3-5years
of data are available: the Holt-Winters method. Holt-Winters is an exten-
sion of exponential smoothing. This is a process in which a predicted value
is updated each time new information becomes available at the end of a
series. It takes its name from the use of moving averages with exponen-
tially declining weights that ensure that the most recent and relevant data
points in the series supply the most information to the predictions.
In the Holt-Winters method, predictions of the level, slope, and season-
ality of a series are updated using exponential smoothing. These predic-
tions are then combined to give a forecast of the next observation in the
series. Holt-Winters has additive and multiplicative forms, which deter-
220
21.3 forecasting for a purpose different from seasonal adjustment 221
mine whether the seasonal component is added to, or multiplied by, the
level and slope components.
For example, if simple forecasts of a large number of series are required
and between 3-5years of data are available then the most sensible ap-
proach would be to use Holt-Winters across the board. This would pro-
vide good quality forecasts of most series without the lengthy manual
modelling of the ARIMA approach.
Although the Holt-Winters method cannot be run in X-13ARIMA-SEATS,
it can be produced in other software.
Section 21.2described the model selection criteria and the options that Using regARIMA
model to generate
forecasts
should be used to fit a model before the seasonal adjustment itself is per-
formed. This section will revisit those suggestions and provide details on
the method and forecast horizon to use to forecast series for a purpose
other than seasonal adjustment.
Extensive analysis of the ONS data shows that the appropriate fore-
casting methods derived in the previous section for seasonal adjustment
purposes are still appropriate and that forecast performances for the rec-
ommended method are not dissimilar from the performances of the al-
ternative methods. This suggests that if the recommended method fails
to select a model, users can equally rely on the alternative approaches in
terms of the quality of forecasts. A major difference from the methods de-
scribed in Section 21.2is the forecast horizon. In fact, the forecast horizon
can now be increased to the maximum reported in Table 21.2if the fit of
the selected model is satisfactory.
Series Length Recommended method Maximum
recom-
mended
length
<6years automdl maxorder = (2,1), no constant 1year
6-10 years automdl maxorder = (3,1), no constant 2years
10-12 years Monthly series: automdl maxorder = (4,1),
no constant
3years
Quarterly series: automdl maxlag = (3,1),
no constant
>12 years automdl maxlag = (4,2), no constant 3years
Table 21.2: Appropriate modelling method and forecast horizon
The first entry in each cell in Table 21.2is the recommended method,
and the second is the maximum number of forecasts that could be gener-
ated. The same attention mentioned in Section 21.2on the constant term
should be paid for series with more than 12 years of data available.
221
222 forecasting
Another major difference between forecasting for seasonal adjustment
purposes and forecasting for other purposes. For forecasting for seasonal
adjustment, the focus is not on the quality of the forecast but on the qual-
ity of the moving average. For forecasting for other purposes, the accuracy
of the forecast is very important. In some situations, for example, forecast-
ing a one-step ahead forecast, it may be desirable not to fix a model, and
use the automatic modelling procedures every time a new forecast is re-
quired. If the automatic model selection procedure fails to select a model,
whether this automatic procedure is the automdl or the pickmdl one, no
arima forecasts should be generated. In this situation users should not
use X-13ARIMA-SEATS for forecasting and another forecasting technique
should be used, such as the Holt-Winters one.
It is important to keep in mind that forecasts estimated beyond the max-
imum recommended length reported in Table 21.2have a high forecast
error and therefore are not reliable, and should not be used in any system.
The reason why that series required a longer forecast horizon should be
considered (for example, unavailability of recent data points) and a differ-
ent solution should be implemented (for example, to investigate the issue
with data compiler and agree, if possible, on an alternative way to get the
recent data points).
If automatic identification has selected a model that, while satisfying the
tests, still has some unsatisfactory features then the following refinements
can be used to improve the quality of the model selected by X-13ARIMA-
SEATS:
If the X-13 output states that there is evidence of regular (non-seasonal)
over-differencing, automdl approach should be used allowing for a
constant term to be selected if significant. However, if the order of
the non-seasonal difference is not reduced (for example from 1to 0),
it is better to use the initially selected model
If the X-13 output states that there is evidence of seasonal over-
differencing, automdl approach should be used with seasonal dum-
mies in the regression part of the model. However, the seasonal dum-
mies should be removed if they are not statistically significant. This
could be the case when the series is not seasonal
The use of these refinements is a matter of judgement and should be
used together with other manual refinements when the automatic model
selected seems counterintuitive, when the series to be forecasted is im-
portant and when experienced resources are available to carry out the
analysis.
222
21.3 forecasting for a purpose different from seasonal adjustment 223
21.3.2Model validation
The forecasting methodology used by X-13ARIMA-SEATS carries with it
certain hazards. In particular, since model selection is an iterative proce-
dure, it is possible to end up with a model which describes the data fairly
well which could be because of one of the two following reasons:
1. The model is a good mode
2. The model is bad model that just happened to fit their particular data
reasonably well, but will not fit future data well
If the model is good, then it will produce good forecasts. But if the
model used describes the series poorly then the forecasts and backcasts
that are generated are probably also poor. Using the quality measures
reported in Chapter 23, for model validation, can reduce the probability
of selecting a bad model by chance. This means before using a model for
forecasting users should verify the accuracy of the model and manually
refine it where necessary.
For example, although the test on the serial correlations of the residuals
may be passed (for example Ljung-Box Q statistic, ACF and PACF peaks
below the threshold) there may still be some individual significant correla-
tions at fairly low lags. It may then be justifiable to try manual refinement
of the automatic model. In this example, it could be worthwhile adding
an extra coefficient at the appropriate lag to the AR or MA component; if
the extra coefficient is significant and the significant serial correlation has
been removed, the extra term might be justified.
21.3.3Considerations
How far ahead to forecast? This depends on individual user require-
ments although it is often found that only one or two future points
are estimated. Users should be aware that the further beyond the
end of the real data a point being forecast is, the less reliable the
estimate is and the less likely it is to be correct when the real data
for that point becomes available. For this reason, it is recommended
that forecasts of data points further than the recommended forecast
horizon are not used as estimates
Are the data non-seasonal? If the time series being forecast are non-
seasonal or already seasonally adjusted then the automdl method
should be used to select the model and check that no seasonal coeffi-
cients have been included in the model. The same applies for series
for which it is known from the seasonal adjustment re-analysis that
223
224 forecasting
are not seasonal (check the seasonal adjustment analysis output di-
agnostics).
If the data are seasonal, then is the time series additive or multi-
plicative? This will involve using log or none function in the trans-
form spec to invoke either the log transformation (multiplicative)
model or no transformation (additive) model. This is determined by
whether the seasonal component of the series is in the form of a
factor or an additive quantity. The decision between additive and
multiplicative is similar to that in seasonal adjustment:
Graph the series to check whether it has additive or multiplica-
tive properties
Check the seasonal adjustment review report if available. This
will state whether the series is seasonally adjusted on an addi-
tive or multiplicative basis
If a series contains any zero values, then the additive method
could be used to prevent any division by zero or a multiplicative
method with a constant argument in the series spec could be
used
If it is still unclear, it is recommended that the multiplicative
method be used
Is the series long enough? ARIMA models require a minimum of
five years to automatically select a model but a minimum of three
years to fix a regARIMA model to carry out a basic forecast. Less
than three years of data would not provide enough information
about the seasonal pattern of the series. Even with three years though,
the forecast would be of poor quality and ideally the series should be
as long as possible. If three years of data are not available, it would
not be possible to use the ARIMA specification and other methods
should be used (such as Holt-Winters or extrapolation methods)
Is the series being forecast an interpolated series? Interpolated data
should not normally be forecast. Forecasting should be conducted
prior to interpolation wherever possible
Outliers, Level Shifts and Seasonal Breaks. These are all unusual
features which can occur in time series data but which have the
potential to undermine or distort the forecasts produced by the re-
gARIMA model. This is particularly true where the feature is close
to the end of the series. There are two possible ways of approaching
this problem:
224
21.3 forecasting for a purpose different from seasonal adjustment 225
1. An easy solution is to ignore the series up to the point of the
break/outlier and just use the subsequent part of the series for
the forecast. The effectiveness of this will obviously depend on
the length of series available after the event (see comment above
on length of series) and the irregularity over that period
2. A more reliable way to treat outliers, level shifts or seasonal
breaks is to treat them in the same manner as in seasonal ad-
justment procedures, that is, with regressors in the regARIMA
model. This involves setting up a regressor variable as described
in Chapter 11 for level shifts and outliers, or in Chapter 14 for a
seasonal break.
225
22
TREND ESTIMATION
22.1 introduction
A seasonally adjusted series contains irregular movements that can some-
times obscure the underlying behaviour in the data. Trends are seasonally
adjusted series with some of the irregularity removed; this can often help
to reveal the medium- to long-term behaviour of the process generating
the time series.
Following the recommendations of a research project conducted by Kenny
and Knowles (1997), ONS adopted a standard method for estimating trends
for monthly time series; many of these trends were subsequently pub-
lished in first releases. The standard method was used for some time until
the ONS publication policy was altered to stop publishing trends. The cur-
rent ONS policy is not to publish the trend, as the trend provides little
additional information to most users.
Trends are calculated using X-13ARIMA-SEATS, and this is the only
method ONS currently recommends for estimating trends. Trends are cal-
culated in X-13ARIMA-SEATS by applying moving averages. The number
of periods over which the average is taken determines the amount of irreg-
ularity removed and so the smoothness of the resulting trend. Usually, the
more irregular the series is the larger the number of periods over which
the moving averages are calculated. The amount of irregularity is mea-
sured using the I/C ratio and the months or quarter to cyclical dominance
(MCD or QCD, respectively). The I/C ratio is the ratio of the average ab-
solute period variations in the trend (C) and the same for the irregular
(I).
22.2 the i/c ratio and the mcd
When estimating trends, there are two related characteristics of the season-
ally adjusted series that are important:
The noise to trend ratio, commonly referred to as the I/C ratio
The months for cyclical dominance MCD
These can both be determined by performing a seasonal adjustment in
X-13ARIMA-SEATS. The MCD can be found in table F2E of the analytic
output, along with the I/C ratio for certain spans, as shown in the example
output below:
227
228 trend estimation
F2.E: I/C RATIO FOR MONTHS SPAN
123456789101112
0.79 0.39 0.23 0.17 0.14 0.12 0.10 0.09 0.08 0.07 0.06 0.05
MONTHS FOR CYCLICAL DOMINANCE: 1
The I/C ratio represents the average percentage change in the irregular (I)
component in the series in comparison to the average percentage change
in the trend (C) over a certain span. This gives a measure of the volatility
of a series. The output has a number of different I/C ratios, all for different
spans of data. The first I/C ratio, 0.79 (shown in red), is for a one-month
span. It is equal to the average percentage change in the irregular from one
month to the next divided by the average percentage change in the trend
from one month to the next. The value is less than one, which means
that the change in the trend dominates the movement of the series over a
one-month span, indicating that the series is not particularly volatile.
The second I/C ratio, 0.39 (shown in blue), is for a two-month span. It
is equal to the average percentage change in the irregular from one month
to two months later divided by the average percentage change in the trend
from one month to two months later. This value is typically less than that
for a one-month span, because the longer the span over which we look,
the more dominant the long-term trend of the series becomes, and the
less influence the irregular has. The ratios are tabulated up to a 12-month
span.
The MCD represents the time it takes the trend to dominate the irregular.
It is the number of months it takes for the I/C ratio to fall below one. In
X-13ARIMA-SEATS the MCD is rounded up to the nearest month. In this
example, the I/C ratio is less than 1for a one-month span, so the MCD
is 1 this implies that it is possible to get an indication of the underlying
short-term trend of the series by looking at the movement from one month
to the next.
The MCD is less useful for series in which the trend changes very slowly.
For these series the average percentage change in the trend will be small
even over longer spans. Since we divide by this value to calculate the I/C
ratio, I/C could become large even if there is not much irregularity in the
series. This could lead to a value for the MCD greater than 1.
F2.E: I/C RATIO FOR MONTHS SPAN
123456789101112
2.47 1.28 0.81 0.59 0.44 0.42 0.35 0.31 0.27 0.23 0.21 0.20
228
22.3 the standard trend estimation method 229
MONTHS FOR CYCLICAL DOMINANCE: 3
In the second example the I/C ratio first falls below 1when a three-month
span is used, so the MCD is 3. This means that, on average, we will need to
look across a three-month span of the seasonally adjusted series in order
to discern the underlying short-term trend. A more formal explanation
can be found in Economic Trends (1972). A copy of this can be obtained
from TSAB.
22.3 the standard trend estimation method
Trend estimates are produced as part of the standard seasonal adjustment
process. The trend estimates that are generated by X-13ARIMA-SEATS can
be extracted and used. This is the easiest option to obtain trend estimates.
An alternative approach is to use the derived seasonally adjusted esti-
mates and apply a user-defined smoother to the seasonally adjusted esti-
mates. This can give greater flexibility in calculating a trend estimate as
the user has more control of the smoothing functions that will be applied.
22.4 presentation of trends
The following quote is from the article (Compton, 1998) and contains some
useful advice about the presentation of trends:
"Trend estimates should not be quoted as headline figures; they should always be
given less emphasis than the seasonally adjusted series. They should be presented
in a graphical form on the front page of a First Release and numbers should be
made available on request. The graph on the front page should show the last 15
months seasonally adjusted data and trend. The trend should be represented by a
solid line with a dashed end to reflect the relative uncertainty of the trend at the
end of the series. The length of the dashed part of the line should be determined by
the following: For a Months for Cyclical Dominance [. . . ] of:
1- use a dashed line for the most recent month
2- use a dashed line for the most recent two months
3+- use a dashed line for the most recent three months.
"All commentary should be written in the past tense. As an optional addition,
“what-if graphs can be shown [. . . ] These give a clearer indication of the degree
of uncertainty of trend estimates at the end of the series."
Figure 22.1shows an example of the standard presentation of the head-
line seasonally adjusted data with the trend, while Figure 22.2gives an
example of a "what-if" or "trumpet" graph (note: the trumpet begins 4
229
230 trend estimation
points from the end of the series, and the confidence intervals depicted in
the graph differ only in the most recent three points).
22.5 considerations
When using X-13ARIMA-SEATS to estimate the trend component, the fol-
lowing issues need to be taken into account:
1.What is the form of the input series? The data that feed into the
trend estimation method should be the published seasonally adjusted
series from the first release
2.Should the additive or multiplicative decomposition be used? The
two approaches to estimate the trend component depend on the de-
composition method in the x11 spec of the specification file. The
choice between additive and multiplicative should already have been
made when the input series was seasonally adjusted. This informa-
tion can be found through a check of the X-13ARIMA-SEATS spec
file used to seasonally adjust the data or a look at the output file. If
the input series was not seasonally adjusted directly then this infor-
mation will obviously not be available. The choice should then be
made using the following criteria:
a) Does the series have negative values? If so, use add in the mode
option of the x11 specification. If not, proceed to the next step
b) When viewing a graph of the time series, does the irregularity
increase as the level of the series increases? If so, use mult in the
mode option of the x11 specification. If not, use add. If unsure,
proceed to next step
c) What is the nature of your data? If the series is an index, use
mult in the mode option of the x11 specification. If the series
is a difference (for example Balance of Payments = Exports -
Imports), use add. If a choice has still not been made, run the
function first with add, then with mult and compare the quality
of the two resulting trends.
230
22.5 considerations 231
Figure 22.1: Front page, first release
Figure 22.2: “What-If graph, background notes
231
23
QUALITY MEASURES
23.1 introduction
The Government Statistical Service (GSS) has long recognised the need to
provide users with information about the quality of statistics and about
the analytical techniques used to derive the figures. This chapter provides
information about quality measures and indicators that can be used for
considerations when measuring and reporting on the quality of time series
outputs1.
23.2 what is quality
Quality, in terms of statistical outputs, can generally be thought of as a
degree to which the data meet user needs, or simply put, the degree to
which the data are fit for purpose.
Quality has often been associated with accuracy and timeliness. But
even if statistics are accurate and timely, they cannot be deemed to be
good quality if they are not based on concepts which are meaningful and
relevant to the users. In addition, different users will have different needs.
Quality measurement and reporting for statistical outputs is therefore con-
cerned with providing the user with sufficient information to judge by
themselves whether or not the data are of sufficient quality for their in-
tended use.
The quality of a statistical output should be determined by its perfor-
mance against a range of attributes that together can be used to assess
whether an output meets users’ quality criteria. The Office for National
Statistics (ONS) has adopted the data quality attributes defined for the Eu-
ropean Statistical System (ESS), which are shown in Table 23.1. This table
has been superseded, but it is reproduced for brevity.
1More information on quality measures can be found in Guidelines for Measuring Statis-
tical Output Quality
233
234 quality measures
Definition Key components
1. RELEVANCE
The degree to which the statistical prod-
uct meets user needs for both coverage and
content.
Any assessment of relevance needs to consider:
who are the users of the statistics?
what are their needs?
how well does the output meet these
needs?
2. ACCURACY
The closeness between an estimated result
and the (unknown) true value.
Accuracy can be split into sampling error and
non-sampling error, where non-sampling error
includes:
coverage error
non-response error
measurement error
processing error; and
model assumption error
3. TIMELINESS AND PUNCTUALITY
Timeliness refers to the lapse of time be-
tween publication and the period to which
the data refer. Punctuality refers to the
time lag between the actual and planned
dates of publication.
An assessment of timeliness and punctuality
should consider the following:
production time
frequency of release; and
punctuality of release
4. ACCESSIBILITY AND CLARITY
Accessibility is the ease with which users
are able to access the data, also reflecting
the format(s) in which the data are avail-
able and the availability of supporting in-
formation.
Specific areas where accessibility and clarity
may be addressed include:
Needs of analysts
Assistance to locate information
Clarity; and
Dissemination
Clarity refers to the quality and sufficiency
of the metadata, illustrations and accompa-
nying advice.
5. COMPARABILITY
The degree to which data can be compared
over time and domain.
Comparability should be addressed in terms of
comparability over:
Time
Spatial domains (sub-national, national
and international); and
Domain or sub-population (industrial sec-
tor, household type)
6. COHERENCE
The degree to which data that are de-
rived from different sources or methods,
but which refer to the same phenomenon
are similar.
Coherence should be addressed in terms of co-
herence between:
Data produced at different frequencies
Other statistics in the same socio-economic
domain
Sources and outputs
Table 23.1: ONS data quality attributes
Quality of data can rarely be explicitly measured. For example, in the
case of accuracy, it is almost impossible to measure non-response bias as
234
23.3 time series quality measures 235
the characteristics of those who do not respond can be difficult to ascer-
tain. Instead, certain information can be provided to help indicate quality.
Quality indicators usually consist of information that is a by-product of
the statistical process. They do not measure quality directly but can pro-
vide enough information to make inferences about the quality. Section 23.4
includes both quality measures and suitable quality indicators that can ei-
ther supplement or act as substitute for the desired quality measure.
23.3 time series quality measures
The following table reports the quality measures specific for time series
analysis together with the output for which they are relevant and the Eu-
ropean Statistical System to which they refer.
N. Quality Measure X13 In-
built
Outputs applicable to ESS Dimension
1Original data visual check All time series Accuracy
2Comparison of the orig-
inal and seasonally ad-
justed data
All seasonal adjustments Accuracy
3Graph of Seasonal-
Irregular (SI) ratios
All time series Comparability
4Analysis of Variance
(ANOVA)
All seasonal adjustments
and trend estimations
Accuracy
5Months (or Quarters) for
Cyclical Dominance
All seasonal adjustments
and trend estimations
Comparability
6The M7statistic All seasonal adjustments Accuracy
7Contingency Table Q All seasonal adjustments
and trend estimations
Comparability
8Stability of Trend and
Adjusted Series Rating
(STAR)
All seasonal adjustments
and trend estimations
Accuracy
9Comparison of annual to-
tals before and after sea-
sonal adjustment
All seasonal adjustments Accuracy
10 Normality test All forecasts Accuracy
11 p-values All forecasts Accuracy
12 Percentage standard fore-
cast error
All forecasts Accuracy
13 Graph of the confidence in-
tervals
All forecasts Accuracy
14 Percentage difference of
unconstrained to con-
strained values
All constrained series Accuracy
Table 23.2: Quality measures used in seasonal adjustment
235
236 quality measures
Each quality measure is presented below with an example or formula
describing their use and with notes providing more detail on the mea-
sure/indicator.
1. Original data visual check. The graph below shows the Airline Pas-
sengers original series. From the graph it is possible to see that the series
has repeated peaks and troughs that occur around the same time each
year. This implies seasonality. It is also possible to see that the trend is af-
fecting the impact of the seasonality. In fact, the amplitude of the seasonal
peaks and troughs change proportionally with the level of the trend. This
suggests that a multiplicative decomposition model is appropriate for the
seasonal adjustment. This series does not show any particular discontinu-
ities (outliers, level shifts or seasonal breaks).
Figure 23.1: Airline passengers
Graphed data can be used in a visual check for the presence of seasonal-
ity, decomposition type model (multiplicative or additive), extreme values,
trend breaks and seasonal breaks.
2. Comparison of the original and seasonally adjusted data. Figure 23.2
below contains a seasonal break that has not been accounted for. By look-
ing at the seasonally adjusted series, there appears to be residual seasonal-
ity left over after seasonal adjustment has taken place (as can be seen every
June and October up until 2003). This is because the change in seasonal
pattern in January 2003 has not been accounted for. Information on how
to deal with seasonal breaks can be found in Section 14.3.
236
23.3 time series quality measures 237
Figure 23.2: Comparison of seasonally adjusted and original series
By graphically comparing the original and seasonally adjusted series, it
can be seen whether the quality of the seasonal adjustment is affected by
any extreme values, trend breaks or seasonal breaks and whether there is
any residual seasonality in the seasonally adjusted series.
3. Graph of Seasonal-Irregular (SI) ratios. In the example below, there
has been a sudden drop in the level of the Seasonal-Irregular component
(called unadjusted SI ratios) for August between 1998 and 1999. This is
caused by a seasonal break in the Car Registration series which was be-
cause of the change in the car number plate registration legislation. Per-
manent prior adjustments should be estimated to correct for this break. If
no action is taken to correct for this break, some of the seasonal variation
will remain in the irregular component resulting in residual seasonality in
the seasonally adjusted series. The result would be a higher level of volatil-
ity in the seasonally adjusted series and a greater likelihood of revisions.
It is possible to identify a seasonal break by a visual inspection of the
seasonal irregular graph (graph of the SI ratios). Any change in the sea-
sonal pattern indicates the presence of a seasonal break.
237
238 quality measures
Figure 23.3: SI ratios for August
4. Analysis of Variance (ANOVA). The formula to calculate the Analysis
of Variance statistic is as follows.
ANOVA =Pn
t=2(D12tD12t1)2
Pn
t=2(D11tD11t1)2(17)
Where:
D12t= data point value for time t in table D12 (final trend-cycle) of the
analytical output;
D11t= data point value for time t in table D11 (final seasonally adjusted
data) of the output.
When calculating the ANOVA, the following considerations should be
taken into account:
If constraining to the annual totals is used and hence the D11A table
is produced, D11A values are used in place of D11
If the statistic is used as a quality indicator for the trend, table A1
should be used instead table D11. The D12t values should be taken
The Analysis of Variance (ANOVA) compares the variation in the trend
component with the variation in the seasonally adjusted series. The vari-
ation of the seasonally adjusted series consists of variations of the trend
and the irregular components. ANOVA indicates how much of the change
of the seasonally adjusted series is attributable to changes primarily in
the trend component. The statistic can take values between 0and 1and
it can be interpreted as a percentage. For example, if ANOVA=0.716, this
means that 71.6% of the movement in the seasonally adjusted series can
be explained by the movement in the trend component and the remainder
is attributable to the irregular component.
238
23.3 time series quality measures 239
This indicator can also be used to measure the quality of the estimated
trend.
5.Months (or Quarters) for Cyclical Dominance. The months for cycli-
cal dominance (MCD) or quarters for cyclical dominance (QCD) are mea-
sures of volatility of a monthly or quarterly series respectively. The for-
mula to derive the statistic is as follows.
MCD(or QCD) = min dN:Id
Cd
< 1(18)
where dis the number of months span considered so that the I/C ratio
falls below 1,Idis the final irregular component at d, and Cdis the final
trend component at d.
This statistic measures the number of periods (months or quarters) that
need to be spanned for the average absolute percentage change in the
trend component of the series to be greater than the average absolute per-
centage change in the irregular component. For example, an MCD of 3
implies that the change in the trend component is greater than the change
in the irregular component for a span at least 3months long. The MCD
(or QCD) can be used to decide the best measure of short-term change in
the seasonally adjusted series; if MCD = 3, a three-month span will be a
better estimate than a one-month span. The lower the MCD (or QCD), the
less volatile the seasonally adjusted series is and the more appropriate the
month-on-month growth rate is a measure of change. The MCD (or QCD)
value is automatically calculated by X-13ARIMA-SEATS and is reported in
table F2E of the analytical output. For monthly data the MCD takes values
between 1and 12, for quarterly data the QCD takes values between 1and
4.
6.The M7statistic. The formula behind M7statistic is as follows.
M7 =s1
27
FS
+3FM
FS(19)
Where: FM=S2
B(N1)
S2
R(N1)(k1)
FS=S2
A(K1)
S2
R(nk)
N= the number of observations
FM= F-statistic capturing moving seasonality
S2
B= the inter-year sum of squares
S2
R= the residual variance (the residual sum of squares)
FS= F-statistic capturing stable seasonality
S2
A= the variance caused by the seasonality factor
239
240 quality measures
M7compares on the basis of F-test statistics the relative contribution of
moving (statistic FM) and stable (statistic FS) seasonality.
This indicates whether the original series has a seasonal pattern or not.
Furthermore, it shows the quality of the adjustment. M7value lies between
0and 3. Low values indicate clear and stable seasonality has been identi-
fied by X-13ARIMA-SEATS. Generally, values between 0and 0.7suggest
seasonality is present; values between 0.7and 1.3show potential season-
ality (but further tests are required to confirm); and values above 1.3are
considered to be non-seasonal. This is not an absolute rule and should
be followed up with further checks. If the adjustment is not good, then
the M7value may output an inflated value, for example, the series might
have a seasonal break not adjusted for. The M7statistic is calculated by X-
13ARIMA-SEATS and can be obtained from the F3table of the analytical
output.
7. Contingency Table Q (CTQ). The formula to analyse the Contingency
Table Q is as follows:
CTQ =U11 +U22
U11 +U12 +U21 +U22
(20)
where Ukl is the value for contingency table cell with row k and column
l and:
∆C > 0 ∆C 0
∆SA > 0 U11 U12
∆SA 0U21 U22
where ∆SA is the change in the SA data, ∆SA =D11tD11t1, and ∆C
is the change in the trend ∆C =D12tD12t1.
The CTQ shows how frequently the gradient of the trend and the sea-
sonally adjusted series over a one period span have the same sign. CTQ
can take values between 0and 1. A value of 1indicates that historically
the trend component has always moved in the same direction as the sea-
sonally adjusted series. A value of 0.5suggests that the movement in the
seasonally adjusted series is likely to be independent from the movement
in the trend component, this can indicate that the series has a flat trend or
that the series is very volatile. A value between 0and 0.5is unlikely but
would indicate that there is a problem with the seasonal adjustment.
If constraining is used point values from table D11A are used in place
of D11.
240
23.3 time series quality measures 241
8. Stability of Trend and Adjusted Series Rating (STAR). The formula
to calculate the Stability of Trend and Adjusted Series Rating (STAR) is as
follows.
STAR =1
N1
N
X
t=2
D13tD13t1
D13t1
(21)
Where D13tis the data point value for time tin table D13 (final irregular
component) of the output, and Nis the number of observations in Table
D13.
This indicates the average absolute percentage change of the irregular
component of the series. The STAR statistic is applicable to multiplicative
decompositions only. The expected revision of the most recent estimate
when a new data point is added is approximately half the value of the
STAR value , for example, a STAR value of 7.8suggests that the revision
is expected to be around 3.9%.
9. Comparison of Annual Totals (CAT) before and after seasonal ad-
justment. The formula for multiplicative models is:
1
n
n
X
t=1E4D11
total(t)100(22)
where E4D11
total(t)is the unmodified ratio of annual totals for time t in
table E4. E4is the output table that shows the ratios of the annual totals
of the original series to the annual totals of the seasonally adjusted series
for all the n years in the series.
The formula for additive models is:
1
n
n
X
t=1
E4D11
total(t)
D11total(t)
(23)
E4D11
total(t)is unmodified difference of annual totals for time t in table E4.
For additive models E4is the output table that calculates the difference
between original annual total and seasonally adjusted annual totals for all
the n years in the series.
This is a measure of the quality of the seasonal adjustment and of the
distortion to the seasonally adjusted series brought about by constraining
the seasonally adjusted annual totals to the annual totals of the original se-
ries. It is particularly useful to judge if it is appropriate for the seasonally
adjusted series to be constrained to the annual totals of the original series.
241
242 quality measures
DIAGNOSTIC CHECKING
Sample Autocorrelation of Residuals
Lag 1 2 3 4 5 6 7 8 9 10 11 12
ACF -0.06 0.12 -0.1-0.31 -0.25 -0.13 0.21 -0.09 0.21 -0.05 0.09 -0.15
SE 0.19 0.19 0.2 0.2 0.21 0.22 0.23 0.23 0.24 0.24 0.24 0.24
Q0.09 0.56 0.86 4.04 6.2 6.8 8.86 8.86 10.8 10.89 11.31 12.44
DF 0 0 1 2 3 4 6 6 8 8 9 10
P0 0 0.355 0.133 0.102 0.147 0.181 0.181 0.208 0.208 0.255 0.256
Model fitted is: ARIMA (0,1,1)(0,1,1). (Quarterly data so 12 lags will be extracted)
10. Normality test. The two statistics below (Geary’s kurtosis (α) and
sample kurtosis (b2) test the regARIMA model residuals for deviations
from normality.
α=
1
nPn
i=1|Xi¯
X|
q1
nPn
i=1(Xi¯
X)2
(24)
b2=m4
m2
2
nPn
i=1(Xi¯
X)4
(Pn
i=1(Xi¯
X)2)2(25)
The assumption of normality is used to calculate the confidence inter-
vals from the standard errors. Consequently, if this assumption is rejected
the estimated confidence intervals will be distorted even if the standard
forecast errors are reliable. A significant value of one of these statistics
(αor b2) indicates that the standardised residuals do not follow a stan-
dard normal distribution, hence the reported confidence intervals might
not represent the actual ones. (X-13ARIMA-SEATS tests for significance at
one percent level.)
11. p-values. An example of the p-value quality measure is as follows.
The model will not be adequate if p-value 0.05 for any of the 12 lags
and will be adequate if p-value > 0.05 for all the lags. Because we are es-
timating 2parameters in this model (one AR and one MA parameter), no
p-values will be calculated for the first 2lags as 2degrees of freedom will
be automatically lost, hence we will start at lag 3. Here all the p-values are
greater than 0.05 at lag 12, Q=12.44, DF=10 and p-value = 0.256, therefore
this model is adequate for forecasting.
This is found in the “Diagnostic checking Sample Autocorrelations of the
Residuals” output table. The p-values show how good the fitted model is.
They measure the probability of the ACF occurring under the hypothesis
that the model has accounted for all serial correlation in the series up to the
lag. Where p-values are greater than 0.05, up to lag 12 for quarterly data
and lag 24 for monthly data, indicate that there is no significant residual
242
23.3 time series quality measures 243
auto-correlation and that, therefore, the model is adequate for forecasting.
12. Percentage forecast standard error. The percentage forecast standard
error is given by:
percentage forecast standard error
forecast x100% (26)
The percentage forecast standard error is required for each forecast pro-
duced and can be found in the forecast table. There will be one number
for each period that has been forecasted. The percentage forecast standard
error is applicable to multiplicative decompositions only.
13. Graph of the confidence intervals. An example of the graph of confi-
dence intervals is reported below. Note that for seasonally adjusted series
which are seasonally adjusted using X-11 based methods there are no vari-
ance estimates provided. To produce variance estimates and confidence
intervals for the seasonally adjusted series see Chapter 24.
Figure 23.4: Graph of forecast estimates and their confidence intervals
14. Percentage difference of unconstrained to constrained values. The
formula to compute the percentage difference of unconstrained to con-
strained values is as follows.
constrained data point
unconstrained data point 1x100% (27)
This indicates the percentage difference between the unconstrained and
the constrained value. This will need to be calculated for each data point
being constrained. The average, minimum and maximum percentage dif-
ferences (among all data points of all the series) of the unconstrained
should be calculated to give an overview of the effect of constraining.
243
244 quality measures
23.4 how to interpret time series quality measures
The following section provides examples to help users in interpreting the
quality measures and the quality indicators when running seasonal ad-
justment, trend estimation, forecasting and constraining. When using a
quality measure to interpret a time series it is important to keep in mind
that none of the diagnostics should be used to explain the quality of a
single component of a time series, but to give users information on the
characteristics of the series. For example, the diagnostics should not be
used to explain if the trend is a good or a bad estimate, but to relate the
behaviour of the trend with that of the seasonal and irregular components.
23.4.1Quality measures for seasonal adjustment
The quality indicators for seasonal adjustment should be used to give
users information on the characteristics of the series (such as to relate
the behaviour of the trend with that of the seasonal and irregular compo-
nents). For example, the quality measure can be used to define:
If the series has identifiable seasonality (by the size of M7, in the F3
table)
How volatile the series is (by the size of STAR and MCD, in the F2
table), and
How the trend relates to the seasonally adjusted series (by the size
of the ANOVA and CTQ)
The visual inspection of the graph of the original series against the sea-
sonally adjusted series can help users to identify residual seasonality in
the seasonally adjusted series.
For example, Figure 23.5shows the original and the seasonally adjusted
series. The M7statistic is high. This suggests that the series is non-seasonal,
and it should not be seasonally adjusted. However, as can be seen in the
graph, the series is not very irregular and most of the movement in the se-
ries is caused by the trend. This is confirmed by the high ANOVA and the
Contingency Table Q (CTQ) statistics and by the very low MCD and STAR
measures. The low Comparison of Annual Totals (CAT) also confirms that
the irregular component does not affect much the series.
23.4.2Quality measures for forecasting
The quality indicators for the forecast should be used to give users in-
formation on the reliability of the projections (for example, to relate the
244
23.4 how to interpret time series quality measures 245
Figure 23.5: Quality measure for seasonal adjustment
goodness of the fitted model with goodness of the forecasts). For exam-
ple, the quality measures can be used to define if the model is suitable
for forecasting (by the size of the normality test and the p-value) and the
dispersion of the forecasts themselves (by the size of the percentage stan-
dard forecast error and the width of the confidence intervals). The visual
inspection of the confidence intervals can help users understanding how
accurate the forecasts are (the wider the confidence intervals are, the less
reliable the projections are).
Figure 23.6shows the confidence intervals of the two-years-ahead fore-
cast. The forecasts are shown by the blue line in the middle. The actual
values are expected to lie somewhere between the lower (pink) and upper
(green) lines, for 95% of the time.
An assumption of normality is used to calculate the confidence intervals.
As the kurtosis statistic is significant, this assumption is rejected and con-
sequently the reported confidence intervals might not represent the actual
ones.
If the p-values presented are greater than 0.05 then we can reject the
null hypothesis that there is no autocorrelation and therefore the model is
fitting well. This implies that a forecast is more reliable though it should
be noted that this does not guarantee a good forecast because of various
factors such as unexpected events such as financial crises.
The Percentage Forecast Errors are a measure of how much the forecast
is expected to differ from the actual value. For January 1998, the first fore-
casted value, we expect that the actual value will be different from the
forecast by 25% on average. For December 1999, the final forecasted value,
245
246 quality measures
Figure 23.6: Confidence intervals with forecasts
we expect that the actual value will be different from the forecast by 75%
on average.
23.4.3Quality measures for trend estimates
The quality indicators for the estimated trend should be used to give users
information on the characteristics of the series (such as relating the be-
haviour of the trend with that of the irregular component). For example,
the quality measure can be used to define how volatile the series is (by the
size of STAR and MCD) and how the trend relates to the seasonally ad-
justed series (by the size of the ANOVA and CTQ). The visual inspection
of the graph of the seasonally adjusted series against the trend can help
users to identify turning points in the behaviour of the series.
Figure 23.7shows a seasonally adjusted series and the trend, which has
been estimated for this series. The ANOVA statistic is low. This suggests,
as can be seen in the graph, that most of the movement from one period
to the next in the seasonally adjusted series is caused by the irregular
component. Approximately one percent of the month-on-month change
in the seasonally adjusted series is explained by movement in the trend.
Also, the high MCD statistic confirms that the series is volatile. In fact, it
takes on average 9months for the trend component to explain more of the
movement in the series than the irregular component. The CTQ statistic
of 0.68, which is outside the range of 0and 0.5, is a further indication that
the series is volatile. The STAR value of 6.78 suggests that the expected
revision of the most recent estimate when a new data point is added will
be approximately 3.4%.
246
23.4 how to interpret time series quality measures 247
Figure 23.7: Quality measures for trend estimates, UK visits abroad
The quality indicators for the constrained series should be used to give
users information on the effect of constraining. For example, the quality
measures can be used to define how far the constrained series is from the
original series. The summary statistics (minimum, average and maximum)
give users an indication of the distribution of the percentage differences
of unconstrained to constrained values. For example, after seasonal ad-
justment, Labour Force Survey series are constrained so that the property
of additivity is fulfilled in every dimension - by age group, employment
status etc. This constraining distorts the seasonal adjustment, so it is ac-
ceptable only if the distortion is small. Eight important high-level aggrega-
tion series of total numbers of active, inactive, employed and unemployed
for both males and females were selected from the Labour Force Survey
dataset. The average difference (among all data points of all series) was
0.11% of unconstrained. The maximum difference (among all data points
of all series) was 0.12% of the unconstrained. For these high-level aggre-
gation series, a Quality Measure of 0.11% suggests good constraining, so
no problems have been detected with the constraining of these series. The
acceptable threshold, for the distortion caused by constraining, should be
considered for each individual series. In practice, the requirement to con-
strain may override any consideration of distortion.
247
24
VARIANCE ESTIMATION
24.1 introduction
An important part of official statistics is the quantification of the uncer-
tainty associated with the published statistics. Quantifying the uncertainty
associated with a statistic allows users to make an assessment of the accu-
racy of the estimates and to take this into account when using the statistics
in analysis and decision making. Uncertainty measures are usually pub-
lished to quantify the size of the errors resulting from the sampling and
imputation methods. This quantification of uncertainty most often takes
the form of standard errors or confidence intervals associated with a par-
ticular estimate. Standard errors are routinely published by National Sta-
tistical Institutes (NSIs) for the non seasonally adjusted (NSA) series but
not for the seasonally adjusted (SA) series, despite the fact that the SA
series is of more interest to users.
24.2 why the nsa standard errors cannot be applied to the
sa series
In X-13ARIMA-SEATS the outlier identification procedures used mean
that the seasonal adjustment procedures are non-linear. The non-linear na-
ture of the method means that simply applying the NSA standard errors
to the SA series will not take account of the backcasts/forecasts implicit in
seasonal adjustment at the ends of the series or the autocovariance struc-
ture of the series and the autocorrelation inherent in the series. For a series
with constant standard error, applying the NSA variance estimates to the
SA series will overestimate the variance by ten per cent in the centre of the
series and underestimate it by 20 per cent at the end of the series1.
24.3 approximate methods
There are several methods available to estimate the variance of the season-
ally adjusted estimators.
1see Scott and Pfeffermann (2004)
249
250 variance estimation
24.3.1Wolter and Monsour
The method Wolter and Monsour (1981) simply uses a linear approxima-
tion to the seasonal adjustment filter. The benefits of this method are that
it is straightforward to explain and will account for the design variance of
estimators. The disadvantages of this method are that it will not account
for other sources of error, it requires the autocovariance of survey errors,
and the variance estimates for a census will be zero.
24.3.2Pfeffermann
The method Pfeffermann (1994) exploits a relationship between survey
errors and the SA residual to obtain variance estimates. The benefits of
this method are that it accounts for sampling and decomposition error, is
largely model-free, can be applied to complex surveys, and does not re-
quire survey error autocovariances. The disadvantages of this method are
that it assumes that the X-11 filter works correctly for the series, it requires
a simplifying assumption for the survey error autocovariance, and there is
a bias detected.
24.3.3Replication
With the replication method, the variance estimates for the NSA series are
used to replicate the NSA series. These replicates are then seasonally ad-
justed using the seasonal adjustment model for the original NSA series.
The distribution of the SA estimates is then used as a proxy for the vari-
ance of the estimators. The benefits of this method are that it is straight-
forward to apply and can be applied to any series. The disadvantages are
that it does not take into account error autocovariance or decomposition
error.
250
25
SOFTWARE
25.1 downloading and installation instruction
Authorisation and advice should be sought from your Departmental IT
and Security teams before downloading, installing or using any software.
The GSS recommended method is X-13ARIMA-SEATS. This is main-
tained by the U.S. Census Bureau (USCB). Advice on the installation of
the software can be found on the USCB website or sought from email.
25.2 alternative seasonal adjustment methods
There are several different software packages that can be used for seasonal
adjustment:
X-13ARIMA-SEATS
The GSS recommended method is X-13ARIMA-SEATS. This is maintained
by the U.S. Census Bureau. As well as using WinX-13 and JDemetra+,
there are seasonal adjustment functions in R, SAS and Python, which are
seas, PROC X13, and statsmodels.tsa.x13, respectively.
TRAMO-SEATS
TRAMO-SEATS software is available from the Bank of Spain. A version of
the TRAMO-SEATS method is also available in WinX13 and in JDemetra+,
where the most recent version of the method is maintained.
BV4.1
This freeware is developed by the Federal Statistical Office of Germany for
the seasonal adjustment of economic time series. It is available free from
the DESTATIS website.
25.3 graphical user interfaces for x-13arima-seats
25.3.1Jdemetra+
JDemerta+ is open source software for seasonal adjustment that has been
developed by the National Bank of Belgium in co-operation with Eurostat.
251
252 software
It is available from the European Commission website. It allows for large
numbers of series to be seasonally adjusted simultaneously, and parame-
ters can easily be changed by clicking on the GUI.
For detailed instructions, see the documentation or the user guide.
Brief user instructions follow:Read in data in
Jdemetra+ To use JDemetra+, data needs to be read in from a spreadsheet, and in-
clude the dates to read in, rather than using a dat file. The spc file and
regressor files can only be written, edited and saved within the JDemetra
software:
Open JD+
From the Providers window Right click in Spreadsheets Open
Click the . . . button and select the input file of interest (e.g., from
Documents folder). The date format should be automatically iden-
tified, but the spreadsheet needs to include the date, for example
01/01/2023 or 01-Jan-2023
Select OK
Figure 25.1: Loading data in JDemetra+
Select the + button left from Spreadsheets in the Providers window
to find the file you imported into JD+. Then right click in this file
Open with Chart & grid
To seasonally adjust a single series in JD+ (with a fixed spec)Seasonally adjust in
Jdemetra+
Select Statistical methods Seasonal Adjustment Single Analysis
X13
252
25.3 graphical user interfaces for x-13arima-seats 253
Figure 25.2: Performing seasonal adjustment using a single analysis in JDemetra+
Drag and drop the imported file “Example 1 from Providers win-
dow into the grey area
To alter the specifications, equivalent of altering the spc file:
From Specifications window (button to toggle this at the top right of
the screen)
Under TRANSFORMATION, change the function from Auto to None
Under ARIMA, untick the Automatic ARIMA model and enter (man-
ually) the parameters P, D, Q, BP, BD, and BQ as in Figure 25.3
Figure 25.3: Changing ARIMA model under a single analysis in JDemetra+
Under OUTLIERS, untick the Is Enabled box
Under X11, unselect the Automatic Henderson filter, select S3X3Sea-
sonal filter, and enter 5as Henderson filter
Under REGRESSION, select the regressors, to adjust for Trading day
and Easter effects
253
254 software
To set AO, LS, TC and SO regressors, click next to the pre-specified
outliers in the REGRESSION section. A window will open within
this. Click in the boxes to add regressors
The regressor diagnostics can be viewed under the pre-processing
drop-down
Figure 25.4: Adding AO and LS regressors under a single analysis in JDemetra+
25.3.2WinX13
WinX13 is a Windows interface for running the X-13ARIMA-SEATS method.
It allows for easy alterations of seasonal adjustment arguments, and al-
lows for testing of different regressors and comparing diagnostics. Due to
its lightweight nature, it is commonly used in TSAB operations. WinX13 is
the preferred graphical user interface for X-13ARIMA-SEATS. See Chap-
ter 4for full instructions on initial use of WinX13. See also the USCB
website for a fuller explanation of its usage.
25.3.3X13GraphJava
This is also produced by the Census Bureau and is available from the
USCB website. It does not run the X-13ARIMA-SEATS method itself, but
uses the .gmt graphical files created by running the method to produce
an extensive range of graphical output, which could further help with
analysis.
25.4rseason package
254
25.4rseason package 255
For detailed instructions on seasonal adjustment using R, detailed instruc-
tions can be found at: http://www.seasonal.website/examples.html https:
//cran.r-project.org/web/packages/seasonal/vignettes/seas.pdf This
requires the installation of the seasonal package, and other packages may
be required for plotting outputs.
Read in data in R
In brief, you first need to read in the data, from either a csv file:
Data = read.csv (file=.. /input_data.csv)
Or a dat file with quarterly or monthly data in datevalue format:
Data = seasonal::import.ts(paste(directory, input_data.dat, sep=\\),
format=datevalue, start =c(YYYY,Q), frequency = 4)
Data = seasonal::import.ts(paste(directory, input_data.dat, sep=\\),
format=datevalue, start =c(YYYY,M), frequency = 12)
Where:
Directory indicates the location of input file
In c (YYYY, Q), YYYY indicates the year and Q indicates the quarter
of the first data point (1Q4). For example, if the data start at
first quarter of 2005, then start = c (2005,1)
In c (YYYY, M), M indicates the month of the first data point (1
M12). For example, if the data start in July 2005, then start = c
(2005,7)
For monthly free input data, use one of the following two R scripts.
Option 1Data = seasonal::import.ts(paste(directory, ”inputdata.dat”, sep=”
”), format=”free”, start=c(YYYY,M), frequency = 12)
Option 2Data = read.csv(paste(directory, ”inputdata.dat”, sep =
),header =FALSE)Data =ts(data,start =c(YYYY,M),frequency =
12)
# Option 1
Data = seasonal::import.ts(paste(directory, input_data.dat, sep=\\),
format=free, start=c(YYYY,M), frequency = 12)
# Option 2
Data = read.csv(paste(directory, input_data.dat, sep=\\),
header=FALSE)
Data = ts(data,start =c(YYYY,M), frequency = 12)
255
256 software
R can span a subset of the series. For example, let the original time
series data span from first quarter of 1995 to first quarter of 2020, but you
are interested to analyse only the data from first quarter of 2001 to fourth
quarter of 2009. To subset the time series data, use the following R script.
Data_interested = window(data,start =c(2001,1), end=c(2009,4))
Seasonally adjust in R
To perform seasonal adjustment in R, use the seas function. An example R
script is illustrated below. Only the yellow-highlighted lines are necessary
for this example, as other arguments will be used by default. The rest of
the lines are presented for comparability reasons with Win-X13, but are
not strictly necessary - more details can be seen in Table 25.1.
output <- seas(data_interested, transform.function ="none",
arima.model ="(0 1 0)(0 1 1)",
outlier = NULL,
# The reason for the outlier = NULL line above is to prevent the
default automatic outlier detection
regression.variables = c(AO2001.1, LS2008.4, Easter[1],
td1coef ),
regression.aictest = NULL,
# The reason for the regression.aictest = NULL line is to prevent the
default AIC test for Easter and trading day effects
estimate.maxiter = 5000,
forecast.maxlead = 4,
forecast.save =c("fct"),
force.type = "denton",
force.rho = 1,
force.lambda = 1,
force.round ="no",
force.usefcst = "no",
force.mode ="ratio",
force.save =c("saa"),
x11.seasonalma = "s3x3",
x11.trendma = 5,
x11.appendfcst = "yes",
x11.save =c("d8","d9","d10","d11","d12","d13","d18")
)
To seasonally adjust in R without a pre-specified spec file:
256
25.4rseason package 257
X-13ARIMA-SEATS R
estimate {maxiter = 5000} estimate.maxiter = 5000
forecast{ forecast.maxlead = 4,
maxlead = 4forecast.save = c("fct")
}
force{ force.type = "denton",
type=denton force.rho = 1,
rho=1force.lambda = 1,
lambda=1force.round = "no",
round=no force.usefcst = "no",
usefcst=no force.mode = "ratio",
mode=ratio force.save = c("saa")
save=saa
}
x11{
appendfcst = “yes” x11.appendfcst = "yes",
save = x11.save =
c(“d8”,”d9”,”d10”,”d11”,
”d12”,”d13”,”d18”)
c("d8","d9","d10","d11",
"d12","d13","d18")
}
Table 25.1: List of specification arguments in X-13ARIMA-SEATS and R seasonal
function equivalents
output <- seas(data_interested,transform.function ="auto",
automdl = ,
regression.aictest =c(easter, td ),
outlier = )
A large number of diagnostical statistics can be found with the udg func-
tion: https://www.rdocumentation.org/packages/seasonal/versions/1.
9.0/topics/udg
25.4.1Plotting outputs in R
To plot time series data in R, use:
Any function among plot or ts.plot for standalone data visualization
The package dygraphs for interactive data visualization
257
258 software
It should be noted that many other options exist as well (e.g., gg-
plot2)
Example R scripts are displayed below:
plot(data, main=Title for the plot, ylab=Title for Y axis)
ts.plot(data, main=Title for the plot, ylab=Title for Y axis)
dygraphs::dygraph(data, main=’Title for the plot’, ylab = ’Title for
Y axis’) %>%
dySeries("V1", label = "NSA") %>%
dyOptions(colors =’black’)
Example time series plots are demonstrated in Figure 25.4(output from
plot/ts.plot function) and Figure 25.5(output from dygraphs package).
Figure 25.5: Graph of data produced using ts.plot
Figure 25.6: Graph of data produced using dygraphs
258
26
QUICK GUIDE TO SOLVING SEASONAL ADJUSTMENT
PROBLEMS
This chapter aims to provide a quick guide for problems encountered
while performing seasonal adjustment with the use of the X-13ARIMA-
SEATS software. This may be useful as a quick reference for those new to
seasonal adjustment.
What if the series is not long enough?
In order to seasonally adjust a series using X-13ARIMA-SEATS, at least
3years of data are required. If the series is less than 3years long, the
seasonally adjusted series should not be published. However, it is recom-
mended that a series be at least 5years long before attempting seasonal
adjustment. If a series is between 3and 5years long, you should consider
not publishing it1.
What if the series is very long?
If the series is longer than, say, 12 years, consider investigating seasonal
breaks to account for evolving seasonality2.
Should I use direct or indirect adjustment?
Indirect adjustment is only justifiable if it improves the seasonal adjust-
ment of the aggregate or if there is a requirement for the component se-
ries to sum to the composite series3. You could also use the history spec
to compare the results between direct adjustment and indirect adjustment
of a particular series4.
How do I check the quality of a seasonal adjustment?
To determine whether a seasonal adjustment is acceptable or not, the
quality statistics produced in the output of X-13ARIMA-SEATS should
be checked. If the Q statistic passes (less than 1) then, in most cases, the
1see Chapter 4for more information
2see Chapter 4for more information
3see Chapter 6for more information
4see Chapter 19 for more information
259
260 quick guide to solving seasonal adjustment problems
seasonal adjustment will be acceptable. It is not necessary for all the M-
statistics to pass for the seasonal adjustment to be acceptable, although it
is ideal.
Other ways to test the suitability of an adjustment are to look at the
seasonally adjusted series graphically and compare it to the non seasonally
adjusted series. If the non seasonally adjusted looks smoother than the
seasonally adjusted, then the adjustment is probably not suitable. Also,
if the seasonally adjusted series appears to have a seasonal pattern, you
need to check for residual seasonality5.
How do I check for residual seasonality?
After running X-13ARIMA-SEATS with the seasonal adjustment parame-
ters specified, the output produces a test for the presence of residual sea-
sonality (found under table D11 - Final seasonally adjusted series) which
will tell you if there is evidence of residual seasonality in whole series or
just in the last three years of the series. You could also look at the diagnos-
tics window in Win X-13 . In the Spectrum & QS tab, the Seasonal Peaks
column tells you if there is residual seasonality present and in which series.
If there is residual seasonality present, the current seasonal adjustment pa-
rameters are not suitable and need to be re-evaluated.
What should I do if the Q statistics fails (grater than 1)?
The Q statistic is just an average of the M statistics. Therefore, you need to
look at the M statistics and consider which of them fail and how/if you
should try to improve it.
What do the M statistics mean?
Table F3of the X-13ARIMA-SEATS output shows the quality statistics and
a number of different M statistics, each of which relate to a different aspect
of the adjustment. These statistics each take a value between 0and 3with
a value higher than 1suggesting a potential problem. Table 26.1is a rough
guide of what each one means and options for how to proceed in the event
of a failure in one of the statistics.
What if: “Identifiable seasonality not present”
The combined test for the presence of seasonality is an indicator of season-
ality but there are other checks that can be done before considering a series
non-seasonal. Something else to consider is the M7statistic. If M7is above
5see Chapter 26 for more information)
260
quick guide to solving seasonal adjustment problems 261
Diagnostic: What it does: How to fix it in the event of a failure:
M1Shows how large the irregular com-
ponent is compared to the seasonal
component
May need to consider suitability
of prior adjustments (outliers, level
shifts etc) or the need for such adjust-
ments to be added
M2Measures the contribution of the ir-
regular component to the variance of
the raw series (transformed to a sta-
tionary series) May need to consider
suitability of prior adjustments (out-
liers, level shifts etc) or the need for
such adjustments to be added
M3Measures the amount of period-to-
period change in the irregular com-
pared to that in the trend.
May need to consider suitability
of prior adjustments (outliers, level
shifts etc) or the need for such adjust-
ments to be added
M4A measure of autocorrelation in the
irregular component.
Consider different moving averages
M5Measures the irregular compared to
the trend
May need to consider suitability
of prior adjustments (outliers, level
shifts etc) or the need for such adjust-
ments to be added
M6Also measures the irregular but is
only valid when a 3x5seasonal filter
is used.
A seasonal filter shorter than 3x5
should be used
M7Shows the amount of moving com-
pared to stable seasonality (basically
how regular the seasonal pattern is)
Suggests the series is not seasonal, or
that seasonality cannot be identified.
M8The size of the fluctuations in the
seasonal component throughout the
whole series
May indicate the presence of a sea-
sonal break or the need for a change
of moving average
M9The average linear movement in the
seasonal component throughout the
whole series
May indicate the presence of a sea-
sonal break or the need for a change
of moving average
M10 The size of the fluctuations in the
seasonal component for recent years
only
May need to consider a change to the
ARIMA model or consider the pres-
ence of a seasonal break within recent
years
M11 The average linear movement in the
seasonal component for recent years
only
May need to consider a change to the
ARIMA model or consider the pres-
ence of a seasonal break within recent
years
Table 26.1: M-statistic meanings and suggestions
1.250 for monthly series or 1.050 for quarterly series, then this suggests
that the series may not be seasonal. See Chapter 16 for more information.
Another way of checking if a series is seasonal is to use the sliding span
diagnostic. This may indicate if the series is becoming non-seasonal/seasonal.
See Chapter 18 for more information. It is also possible to compare the
standard deviations given in the E5and E6outputs. E5shows the month-
to-month percent change in the original series and E6shows the month-to-
month percent change in the seasonally adjusted series. Both of which give
the standard deviation of the respective series under the tables provided.
261
262 quick guide to solving seasonal adjustment problems
For a strongly seasonal series, it would be expected that the standard de-
viation in the month-to-month percent change would be much higher in
the original series than the seasonally adjusted series. Therefore, similar
standard deviations may suggest a series is not seasonal.
Other measures that could be used would be the combined test and
M7result in the sliding spans analysis. This may indicate emerging or
decaying seasonality. Additionally, it might be worth looking at the graphs
of the series and the SI ratios to check for seasonality.
All the above methods should be considered as a whole, as they some-
times contradict one another.
Which prior adjustment are permanent and which are temporary?
There are two types of prior adjustments; below are examples of both
types of prior adjustments:
Temporary Permanent
Level Shifts Easter effects
Additive Outliers Trading day effects
Ramps Seasonal breaks
Table 26.2: Examples of temporary and permanent prior adjustments
What does it mean if Ljung-Box or Box-Pierce Q statistics fails?
The Ljung-Box and Box-Pierce statistics test if there is any evidence of au-
tocorrelation in the residuals of the ARIMA model selected. In the Model
Diagnostics tab, the #LBQ fail column tells you the number of lags from
1to 24 where the Ljung-Box Q statistic indicates autocorrelation and the
#BPQ fail column tells you the same for the Box-pierce Q statistic fails.
Next look at the corresponding sig LBQ/sig BPQ column which will spec-
ify at which lags the autocorrelation occurs. Autocorrelation at lags 2,4,
8etc (for quarterly series) and 3,4,6,12,24 (for monthly series) suggests
seasonality which is a problem. In this case, a change to the ARIMA model
should be considered.
For example: if you are currently using the ARIMA model (011)(011), a
change to (011)(012) may be considered more suitable and could be tested.
For more information or advice, contact the Time Series Analysis Branch.
What does it mean if there are significant seasonal or trading day peaks in the
spectrum of the seasonally adjusted or irregular series?
Seasonal peaks present in the seasonally adjusted series suggest that not
all the seasonality has been removed during the seasonal adjustment pro-
262
quick guide to solving seasonal adjustment problems 263
cess. In this case, see Section 27.5above. You then need to alter the pa-
rameters selected for seasonal adjustment in order to remove the residual
seasonality.
If there are significant trading day peaks in the spectrum of the sea-
sonally adjusted series, this means that trading day effects have not been
completely removed during the seasonal adjustment process. In the case
that trading day peaks are present, first look at the diagnostics window in
Win X-13. In the Spectrum & QS tab, the Nonsig TD Peaks column tells
you if there are trading day peaks present and if so, in which series they
are present. You can then look at the corresponding column to find out
which type of peak is present; a t1peak or a t2peak. The occurrence of
t1peaks is more serious whereas t2peaks are less important, therefore, in
the event of a t1peak being present, the following things could be consid-
ered. First you may want to consider removing any trading day regressors
that have been added to the seasonal adjustment or, if no such regres-
sors exist, try adding one to the adjustment parameters (see Chapter 9for
more information on the different types of trading day regressors). If nei-
ther of these options remove the t1peaks, you could consider altering the
seasonal filter6.
What does it mean if there are significant seasonal or trading day peaks in the
spectrum of the model residual series?
Significant trading day peaks in the spectrum of the model residual series
means that trading day effects have not been accurately estimated and
removed by the regARIMA model. If trading day peaks are present, as ex-
plained above, first look at the diagnostics window in Win X-13. Consider
removing any trading day regressors that have been added to the regres-
sion spec or, if no such regressors exist, try adding one to the adjustment
parameters7.
If significant seasonal peaks are present in the spectrum of the model
residual series, this may mean that seasonality has not been correctly esti-
mated and removed by the regARIMA model. In this case, a change to the
ARIMA model should be considered.
For example, if you are currently using the ARIMA model (011)(011), a
change to (011)(012) or (011)(111) may be considered more suitable and
could be tested. For more information or advice, contact the Time Series
Analysis Branch.
6see Section 13.4.1for more information on the different types on seasonal filters
7see Chapter 9for more information on the different types of trading day regressors
263
264 quick guide to solving seasonal adjustment problems
What do I do if there are significant autocorrelation/partial autocorrelation peaks
in the model residuals?
Autocorrelation shows how much a particular frequency contributes to a
time series. If there is a significant peak in the Autocorrelation Function
(ACF) or Partial Autocorrelation Function (PACF), this may indicate that
the parameters used (such as trading day effects) should be checked for
suitability. This can be checked by looking at the model diagnostics tab in
the diagnostics window in Win X-13. The sig ACF and sig PACF columns
will indicate at which lags the autocorrelation or partial autocorrelation
occurs. Significant ACF/PACF peaks at lags 2,4,8etc (for quarterly series)
and 3,4,6,12,24 (for monthly series) are extremely important and peaks
at these lags could indicate a problem with seasonality in the residuals. In
this case, a change to the ARIMA model could be considered.
For example: if you are currently using the ARIMA model (011)(011)
and there are seasonal ACF peaks, a change to (011)(012) may be consid-
ered more suitable and could be tested. If there are seasonal PACF peaks,
a change to (011)(111) may be more suitable. For more information or ad-
vice, contact the Time Series Analysis Branch.
Why is my previously working seasonal adjustment now failing?
There are a few common reasons why a previously working seasonal ad-
justment spec file would stop working. Often, adding values which pro-
duce seasonally adjusted values at or below zero would cause the series
to fail if the series in log transformed. A quick fix is to use transform-
function=log constant=0.1, however, the revisions could be large. A more
thorough fix would be to apply a ppp seasonal break before the start of
any negative seasonal adjustment8. If a series is using a seasonal break,
then the ppp or rmx files will be time limited. Once new data exceed this
time limit, then the series will stop working. The ppp and rmx files will
have to be extended beyond the latest data point. Often, these can be ex-
tended for years at a time, but will need review at a future date, to ensure
they are correctly applied.
Why are my revisions so large?
Revisions to seasonally adjusted or forecast data can be caused by revi-
sions to existing NSA data, or new unseasonal NSA data. Use of regres-
sors such as Additive outliers can prevent the effect of un-seasonal NSA
data from spreading to other periods, because the moving averages will
be unaffected.
8see Chapter 15
264
quick guide to solving seasonal adjustment problems 265
How do I adjust for COVID-19 effects?
COVID-19 has resulted in many non-seasonal outliers. In general, TSAB
has had to make many interventions to prevent unseasonal changes to the
data and large revisions to SA data in 2019. Copious use of level shifts
in 2020 Q2, and additive outliers in 2020 mean that highly unseasonal
effects of COVID-19 does not affect the moving averages and spread to
other years. A selection of level shifts and ramps may be required through
2021 as series return to levels and seasonality similar to 2019. For further
information, contact the Time Series Analysis Branch.
265
BIBLIOGRAPHY
Bell, William R. and Steven C. Hillmer (1984). “Issues Involved with the
Seasonal Adjustment of Economic Time Series.” In: Journal of Business
Economic Statistics 2.4, pp. 291320.issn:07350015.url:http://www.
jstor.org/stable/1391266.
Box, George E. P., Steven C. Hillmer, and George C. Tiao (1978). “Anal-
ysis and Modeling of Seasonal Time Series.” In: Seasonal Analysis of
Economic Time Series. NBER Chapters. National Bureau of Economic
Research, Inc, pp. 309344.url:https://ideas.repec.org/h/nbr/
nberch/4329.html.
Burman, J. P. (1980). “Seasonal Adjustment by Signal Extraction.” In: Jour-
nal of the Royal Statistical Society. Series A (General) 143.3, pp. 321337.
issn:00359238.url:http://www.jstor.org/stable/2982132 (visited
on 11/27/2023).
Chatfield, Chris (Mar. 2016). The Analysis of Time Series: An Introduction,
Sixth Edition. Boca Raton, CRC Press, pp. 1329.isbn:9780429208706.
doi:10.4324/9780203491683.
Cleveland, W. P. and G. C. Tiao (1976). “Decomposition of Seasonal Time
Series: A Model for the Census X-11 Program.” In: Journal of the Ameri-
can Statistical Association 71.355, pp. 581587.issn:01621459.url:http:
//www.jstor.org/stable/2285586 (visited on 11/27/2023).
Compton, Simon (1998). “Estimating and Presenting Short-Term Trends.”
In: Economic Trends September 538.
Dagum, Estela (Jan. 1980). “The X-II-ARIMA seasonal adjustment method.”
In: Statistics Canada Catalogue 12-564E.
Findley, David F., Brian C. Monsell, William R. Bell, Mark C. Otto, and
Bor-Chung Chen (1998). “[New Capabilities and Methods of the X-12-
ARIMA Seasonal-Adjustment Program]: Reply.” In: Journal of Business
Economic Statistics 16.2, pp. 169177.issn:07350015.url:http://www.
jstor.org/stable/1392572.
Findley, David F., Brian C. Monsell, Holly B. Shulman, and Marian G. Pugh
(1990). “Sliding-Spans Diagnostics for Seasonal and Related Adjust-
ments.” In: Journal of the American Statistical Association 85.410, pp. 345
355.issn:01621459.url:http://www.jstor.org/stable/2289770.
Gómez, Víctor and Agustín Maravall (2001). “Seasonal adjustment and
signal extraction in economic time series.” In: New York: Wiley and
Sons. url:https://api.semanticscholar.org/CorpusID:148567468.
Hillmer, S. C. and G. C. Tiao (1982). “An ARIMA-Model-Based Approach
to Seasonal Adjustment.” In: Journal of the American Statistical Associa-
267
268 bibliography
tion 77.377, pp. 6370.doi:10.1080/01621459.1982.10477767. eprint:
https:/ /www.tandfonline.com/doi/pdf/ 10.1080/01621459.1982.
10477767.url:https: / /www. tandfonline .com / doi/abs / 10. 1080 /
01621459.1982.10477767.
Kenny, P.B and J. Knowles (1997). An Investigation of Trend Estimation
Methods.” In: Office for National Statistics, Methods and Quality Division,
UK, MQ 044.
Ladiray, Dominique and Benoît Quenneville (Jan. 2001). Seasonal Adjust-
ment with the X-11 Method. Vol. 158. New York: Springer. isbn:978-0-
387-95171-3.doi:10.1007/978-1-4613-0175-2.
Maravall, Agustin (1988). “A note on minimum mean squared error esti-
mation of signals with unit roots.” In: Journal of Economic Dynamics and
Control 12.2-3, pp. 589593.url:https://ideas.repec.org/a/eee/
dyncon/v12y1988i2-3p589-593.html.
Maravall, Agustin and David A. Pierce (1987). “A Prototypical Seasonal
Adjustment Model.” In: Journal of Time Series Analysis 8.2, pp. 177193.
doi:10.1111/j.1467-9892.1987..url:https://ideas.repec.org/a/
bla/jtsera/v8y1987i2p177-193.html.
Mazzi, Gian, Dominique Ladiray, Dario Buono, Duncan Elliot, Robert Kirch-
ner, Gary Brown, Rosa Ruggeri Cannata, and Marc Boxall (May 2015).
ESS Guidelines on Seasonal Adjustment, 2015 Edition, Eurostat.isbn:978-
92-79-45176-8.doi:10 . 2785 / 317290.url:http : / / ec . europa . eu /
eurostat/documents/3859598/6830795/KS-GQ-15-001-EN-N.pdf.
Pfeffermann, D. (1994). “A General Method For Estimating The Variances
Of X-11 Seasonally Adjusted Estimators.” In: Journal of Time Series Anal-
ysis 15.1, pp. 85116.doi:10.1111/j.1467- 9892.1994..url:https:
//ideas.repec.org/a/bla/jtsera/v15y1994i1p85-116.html.
Scott S., M. Sverchkov and D. Pfeffermann (2004). “Variance Measures
for Seasonally Adjusted Employment and Employment Change.” In:
Proceedings of the Joint Statistical Meetings, pp. 13281335.
Shiskin, Julius, Allan H Young, and John C. Musgrave (1965). “The X-11
variant of the census method II seasonal adjustment program.” In: 15.
Bureau of the Census, US Department of Commmerce. url:https :
//api.semanticscholar.org/CorpusID:152843577.
Soukup, Raymond J. and David F. Findley (1998). “On the Spectrum Di-
agnostics Used by X-12-ARIMA to Indicate the Presence of Trading
Day Effects after Modeling or Adjustment.” In: url:https : / / api .
semanticscholar.org/CorpusID:146045354.
Soukup, Raymond J., David F. Findley, U. S. Census Bureau, and David
F. Findley (2001). “Detection and Modeling of Trading Day Effects.”
In: pp. 743753.url:https://api.semanticscholar.org/CorpusID:
208243791.
268
bibliography 269
Wolter, Kirk M. and Nash J. Monsour (1981). “On the problem of vari-
ance estimation for a deseasonalized series.” In: Current Topics in Sur-
vey Sampling. Ed. by D. KREWSKI, R. PLATEK, and J.N.K. RAO. Aca-
demic Press, pp. 367403.isbn:978-0-12-426280-5.doi:https://doi.
org / 10 . 1016 / B978 - 0 - 12 - 426280 - 5 . 50028 - 9.url:https : / / www .
sciencedirect.com/science/article/pii/B9780124262805500289.
X-13ARIMA-SEATS, Time Series Research Staff (2017). “X-13ARIMA-SEATS
Reference Manual.” In: U.S. Census Bureau 33.4, pp. 113351.
269
INDEX
Additive model, 3
Additive outliers, 107
Additivity, 42
Aggregate series, 41
Analysis of variance (ANOVA), 238
Annual constraining, 34
Annual updating, 55
BV4.1,251
Combined test for the presence of
identifiable seasonality, 142
Comparison of annual totals be-
fore and after seasonal ad-
justment, 235
Composite spec, 211
Composite time series, 159
Consistency, 33
Constraining, 34
Contingency table Q, 240
Current updating, 49
Date-value, 251
Decomposition, 121
Diagnostic checking, 17
Direct seasonal adjustment, 44
Easter, 78
Forecasting, 217
Forward factors, 49
Free format, 20
Graphs, 181
Henderson moving averages, 131
History diagnostics, 199
Indirect seasonal adjustment, 44
Irregular component, 10
JDemetra+, 251
Level shifts, 107
Months (or quarters) for cyclical
dominance, 239
Months for cyclical dominance, 173
Moving averages, 127
Moving holidays, 89
Multiplicative model, 3
Non-calendar data, 87
Normality test, 242
Outliers, 107
Output diagnostics, 164
Percentage forecast standard error,
243
Permanent prior adjustments, 84
Pfeffermann (1994), 250
pickmdl, 60
Presentation of trends, 229
Quality measures, 233
Quality measures for forecasting,
244
Quality measures for trend estimates,
246
Quick guide, 259
regARIMA model, 55
Replication, 250
Revision history, 199
Revisions, 49
Seasonal adjustment, 1
Seasonal break, 139
Seasonal moving average, 132
Seasonality, 157
SEATS, 7
Short series, 30
SI ratio, 11
Sliding spans, 189
Software, 251
Specification file, 21
Spectrum, 185
Stability of trend and adjusted se-
ries rating (STAR), 241
td1coef, 77
td1nolpyear, 77
tdnolpyear, 77
271
272 bibliography
tdstock [w], 77
The M7statistic, 239
Time series quality measures, 235
Trading day, 73
Trading day variables, 35
TRAMO-SEATS, 251
Transformation, 56
Trend, 10
Trend estimation, 227
Trend moving averages, 131
Variance estimation, 249
Weak seasonality, 158
Win X-13,19,163
WinX13,254
Wolter and Monsour, 250
X-11-ARIMA, 7
X13-save, 27
X-13ARIMA-SEATS, 7,163,251
X13GraphJava, 254
272